Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON IDLE 1) Write a Python program that takes as input a month and year (as integer numbers) and determines the number of days in

PYTHON IDLE

1) Write a Python program that takes as input a month and year (as integer numbers) and determines the number of days in the month, and prints them to the output. Thirty days are in September, April, June, and November. All the rest are 31 except for February which could be 28 or 29 depending upon whether the year is a leap year or not. Consider a year a leap year if it is evenly divisible by 4.

2) Write a Python program that asks users to input 10 float numbers (using a while statement), and print the minimum number.

3) Write a Python program that asks users to input an integer number and print the summation of its digits and total number of its digits. (i.e., for n=35, sum is 3+5=8, and total number of digits is 2.

4) Write a simple calculator python program that prints the following menu:

1. Addition

2. Subtraction

3. Multiplication

4. Division

5. Quit

That takes as input the number of desired operations and 2 numbers and outputs the calculation result. After printing each calculation result the program must reshow the operations menu and ask user if she/he wants to choose another operation or quit.

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

Students also viewed these Databases questions