Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 codeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started