Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note: Each item below is a separate question (program). Answer all questions in one python file (Lab2.py). Separate by comments. E.g. #Q1 1- Ask the
Note: Each item below is a separate question (program). Answer all questions in one python file (Lab2.py). Separate by comments. E.g. #Q1 1- Ask the user to enter 2 integers and 1 float, print out the sum and the product of all 3 numbers. Hint: Write 3 separate input function calls to get the 3 numbers. What result do you get if you enter an integer value for the 3rd number? Write in a comment. Sample output for 4, 8, 9.2: You have entered: 4, 8, 9.2 The sum is: 21.2 The product is: 294.4 2- Ask the user to enter an integer y between 12 and 20. Print the number in decimal, binary and hex. Sample output for y=15 The number in decimal is: 15 The number in binary is: Ob1111 The number in hex is: OxF
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