subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 09:50
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Following are uses of spreadsheets. for each use, choose whether the use is a business use, consumer use, or student use. family budget: sales data: recording research data for science class:
Answers: 2
question
Computers and Technology, 24.06.2019 18:00
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
You know the right answer?
Here is a set of month data for a fictitious country that does not use the twelve-month roman calend...
Questions
question
Mathematics, 15.01.2020 17:31