Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes Browsers And Databases Data Mining Tools For Integrated Genomic Databases

Authors: Peter Schattner

1st Edition

0521711320, 978-0521711326

More Books

Students also viewed these Databases questions

Question

=+Is the sex appropriate for the organization?

Answered: 1 week ago

Question

Can anyone help solve this?

Answered: 1 week ago

Question

Evaluate the importance of diversity in the workforce.

Answered: 1 week ago

Question

Identify the legal standards of the recruitment process.

Answered: 1 week ago