Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- try:
- first_number = (input("\033[1m\033[96mВведіть перше число: \033[0m"))
- second_number = (input("\033[1m\033[33mВведіть друге число: \033[0m"))
- third_number = (input("\033[1m\033[95mВведіть третє число: \033[0m"))
- float(first_number)
- float(second_number)
- float(third_number)
- break
- except:
- print("\033[1m\033[31mВводити можна тільки числа. Спробуйте ще раз!\033[0m")
- continue
- first_number = float(first_number)
- second_number = float(second_number)
- third_number = float(third_number)
- if first_number.is_integer() == True:
- first_number = int(first_number)
- if second_number.is_integer() == True:
- second_number = int(second_number)
- if third_number.is_integer() == True:
- third_number = int(third_number)
- m = max(first_number, second_number, third_number)
- print("\033[92;1mНайбільше число –\033[97m", m, "\033[0m")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement