Question
Python 3 program - part (a) The months that have 31 days are January (1), March (3), May (5), July(7), August(8), October(10), and December(12). Feb
Python 3 program -
part (a) The months that have 31 days are January (1), March (3), May (5), July(7), August(8), October(10), and December(12). Feb (2) has only 28 days and the rest have 30 days: April(4), June (6), September (9), and November(11). --> Write a program that will ask the user for the numeric month, and will tell the user the number of days in that month. For example it should run like this:
Please enter a numeric month: 2
That month has 31 days.
part (b): Write a function that will accept on argument, a string. If there are any digits (numeric characters) within the string, it will add them together and print the total.
For example, if this string is passed to the function:
"This order contains 3 apples 2 bananas and 6 lemons"
Then the function should print: 11
Step 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