Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 2. Намиране на най-голямото (while)
- # Потребителят въвежда числа едно по едно. Когато въведе "stop" – въвеждането приключва.
- # Намерете най-голямото въведено число.
- num = input("Please enter number: ")
- max_num = float(num)
- while num != "stop":
- num_curr = float(num)
- if max_num < num_curr:
- max_num = num_curr
- num = input("Please enter number or 'stop' for termination: ")
- print("The maximum number of numbers entered is: " + str(max_num))
Advertisement
Add Comment
Please, Sign In to add comment