Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program: Number Propertles Your task in this programming assignment is to write a Python program that prompts the user to enter three integers, followed by
Program: Number Propertles Your task in this programming assignment is to write a Python program that prompts the user to enter three integers, followed by output that displays various properties (prime, even/odd, maximum, maximum product) about those numbers. Before going any further, here's output of a sample run (user input is shown in bold red): Here's output of another sample run (again, user input is shown in bold red): Enter a number: 65 Enter a number: 12 Enter a number: 44 Num Even Prime 65 odd False 12 even False 44 even False The largest number is 65 The largest possible product is 2860 Here's output of yet another sample run (again, user input is shown in bold red): Enter a number: 1234567 Enter a number: 9876543 Enter a number: 1000231 To help clarify, here are some specifics and/or constraints: (1) Your program will require at least five functions that meet the following criteria. Feel free to add any extra functions you deem necessary. - A function that prompts the user for a single number and returns it to the calling statement. - A function that receives an integer as an argument, and returns a string with the value "odd" or "even" based on whether that argument is an even or odd number. - A function that receives an integer as an argument and returns a boolean that describes whether that number is a prime number or not. - A function that receives three integers as arguments, and returns the largest value of the three numbers. - A function that receives three integers as arguments and returns the maximum product possible from multiplying two of the three arguments. (2) The main part of your program should make use of the functions defined and any other extra statements/functions necessary in order to satisfy the problem statement i.e. prompt user for 3 numbers and print out properties of the selected numbers; (3) Your output should be formatted to look exactly like the output shown in the sample runs above 1. Of course, the actual results will depend on the input values one enters while running your code. (4) The properties should be calculated using simple programming statements i.e. use of libraries, math functions, or utilities is prohibited. (5) Calculating the various statistics must NOT be done using any math functions, list functions, libraries, or utilities (i.e., do so manually using if-statements and/or basic arithmetic expressions); (6) If your code requires the use of a repetition construct, only use while loops. (7) You must include a meaningful header, use good coding style, use meaningful variable names, and comment your source code where appropriate; (8) You must use the provided source code template (it provides a good starting point for the header and comments expected in your submission); and (9) You must submit your source code as a single .py file. Feel free to google if you do not know how to calculate some of these statistics
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