Ask Question
21 October, 07:48

Days of Each Month Design a program that displays the number of days in each month. The program’s output should be similar to this: January has 31 days. February has 28 days. March has 31 days. April has 30 days. May has 31 days. June has 30 days. July has 31 days. August has 31 days. September has 30 days. October has 31 days. November has 30 days. December has 31 days. Psuedocode

+2
Answers (1)
  1. 21 October, 09:10
    0
    A python script:

    months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]

    numbers = [31,28,31,30,31,30,31,31,30,31,30,31]

    counter = 0

    numbers_length=len (numbers) - 1

    while counter < = numbers_length:

    month=months[counter]

    number=numbers[counter]

    print (month + " has " + str (number) + " days")

    counter = counter+1

    Explanation:

    The Python script above will generate this output:

    January has 31 days.

    February has 28 days.

    March has 31 days.

    April has 30 days.

    May has 31 days.

    June has 30 days.

    July has 31 days.

    August has 31 days.

    September has 30 days.

    October has 31 days.

    November has 30 days.

    December has 31 days.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Days of Each Month Design a program that displays the number of days in each month. The program’s output should be similar to this: ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers