Computers and Technology

Here is a set of month data for a fictitious country that does not use the twelve-month roman calendar. $monthDays = array ('Splorch' => 23, 'Sploo' => 28,
'Splat' => 2, 'Splatt' => 3,
'Spleen' => 44, 'Splune' => 30,
'Spling' => 61, 'Slendo' => 61,
'Sploctember' => 31, 'Splictember' => 31,
'Splanet' => 30, 'TheRest' => 22);
a. Write a program that finds the number of days in the shortest month and the longest month in this calendar. Ideally, you will do so without relying on loops. Instead, you should take advantage of built-in functions for exploring and manipulating arrays. You may wishto refer to the PHP documentation to identify the functions that determine the minimum and maximum values within an array.
b. Write a program that finds the total number of days in a year with this arrangement of months. Again, you should try to do so without relying on explicit loops. (You certainly should assume no knowledge of the underlying data.)
c. Write a program that prints the name of the shortest and longest month.
Exercise 2: Sorting Associative Arrays
Consider your program that prints out the table of months and the corresponding number of days in that month.
a. Suppose we arranged to sort the array before printing the table. What effect do you expectsuch sorting to have on the output?
b. Check your answer experimentally

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:00, SuperWoman9172
What is one of the main problems that can occur when implementing a large number of new systems within an organization?
Answers: 1
image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 22.06.2019 19:10, sammigrace5820
How might the success of your campaign be affected if you havenโ€™t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, MalikaJones
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
Do you know the correct answer?
Here is a set of month data for a fictitious country that does not use the twelve-month roman calend...

Questions in other subjects:

Konu
Mathematics, 20.07.2019 09:30
Konu
Social Studies, 20.07.2019 09:30