Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need this to output 15 I keep getting 15.0 how do I remove the decimal? Write a program whose inputs are three integers, and
I need this to output 15 I keep getting 15.0 how do I remove the decimal?
Write a program whose inputs are three integers, and whose output is the largest of the three values.
Ex: If the input is:
Input
7
15
3
Output
15
num1 = float(input())
num2 = float(input())
num3 = float(input())
if (num1 >= num2) and (num1 >= num3):
largest = num1
elif (num2 >= num1) and (num2 >= num3):
largest = num2
else:
largest = num3
print (largest)
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