Ask Question
19 July, 20:28

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

+4
Answers (1)
  1. 20 July, 00:03
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers