: Create a python function that will accept 7 numbers with decimal values and wont accept value if it isn't a float value. After accepting the values, determine the number with the highest values among the given, and then return that value for printing.
num_list = []
def number():
while len(num_list) < 7:
a = input("Enter float number: ")
if '.' in a:
try:
num_list.append(float(a))
except ValueError:
print("Error! Enter float number!")
else:
print("Error! Enter float number!")
number()
print(max(num_list))
Comments
Leave a comment