+ 2
Write a python program which will ask user to enter 3 numbers. Your program will output the sum and average of these 3numbers.your program will also output the largest number, the smallest number of these three. For exampleif user enter 2,10,3 than your program will output, For number 2,10,3 sum is 15,average is 5,the largest number is 10 and the smallest number is 2.
Can someon show it to me on python software that it runs??
10 Réponses
+ 3
Done
EDIT:Oh, I forgot thehighest and smallest
+ 2
Ok
+ 1
Ummm, can't fit
+ 1
Kindly help out: I have been working on this question but getting error messages. Write a program which repeatedly reads numbers until the
user enters “done”. Once “done” is entered, print out the total, count,
and average of the numbers. If the user enters anything other than a
number, detect their mistake using try and except and print an error
message and skip to the next number.
0
Me better try wait
EDIT:
n1=input("Enter a number please?") #That is first number, 2
n2=input("Enter another number?") #Second number, 10
n3=input("Enter a third number?") #Third number, 3
sum=n1+n2+n3 #That is the sum
print("The sum of three number is", sum)
avr=sum/3 #That is the avarage
print("The avarage is", avr)
if n1>n2 and n1>n3:
print("Number 1 is highest")
elif n2>n1 and n2>n3:
print("Number 2 is highest")
0
Please let me highest and lowest
0
Try it and get exact output which you want..
x=float(input("Enter 1st number:"))
y=float(input("Enter 2nd number:"))
z=float(input("Enter 3rd number:"))
sum=x+y+z
print("The sum of three number is:",sum)
avr=sum/3
print("Average is:",avr)
print("Maximum number is:",max(x,y,z))
print("Minimum number is:",min(x,y,z))
0
Write a python code to ask the user three numbers.Then, your program finds and shows the summation and thw multiplication of the numbers (Use format function)
0
Write a python program which will ask user to enter 3 numbers. Your program will output the sum and average of these 3numbers.your program will also output the largest number, the smallest number of these three. For exampleif user enter 2,10,3 than your program will output,
For number 2,10,3 sum is 15,average is 5,the largest number is 10 and the smallest number is 2.
Can someon show it to me on python software that it runs??
- 1
avr=sum/3 is not working they make an error