Question: python Add ta Exercise# 3: Write a program that asks the user to enter a month (1 for January, 2 for February, and so on)

python
Add ta Exercise# 3: Write a program that asks the user to enter a month (1 for January, 2 for February, and so on) and then prints the number of days in the month. For February, print "28 or 29 days". - Enter a month:5 30 days Do not use a separate if/else branch for each month. Use Boolean operators. Sample Run Sample Run Sample Run Enter a month: 6 Enter a month: 3 30 days 31 days Enter a month: 2 28 or 29 days Marks: 2 n[ ]: Add tag # insert code Add tag . Exercise# 4: Write a program that prompts the user to provide a single character from the alphabet. Print Vowel or Consonant, depending on the user input. If the user input is not a letter (between a and z or A and 2), or is a string of length > 1, print an error message. Sample Run Sample Run Sample Run Sample Run Enter one character python That input didn't have a valid length Enter one character: B Enter one character, e Consonant Vowel Enter one character: & That was neither a vowel nor a consonant Marks: 2 In [ ]: Add tag # insert code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
