I am trying to make a program that will ask a user to enter a number and then ask them if they want to enter another number. Based on the numbers they enter the program will sum them and give the average of them.
Here is what I have so far but I understand it doesnt work. Any help is greatly appreciated.
a = int(input("Enter a number: "))
more = input("Please enter Y or N if you want to add more numbers: ")
def funct(more):
while more == "Y":
b = int(input("Enter another number: "))
abSum = a + b
abMean = a + b / 2
if more == "Y":
return b
else:
break
print(abSum)
print(abMean)
try something like:
output: