Sichanov

ww

Jan 28th, 2021
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. while True:
  2.     number = float(input())
  3.     if number < 0:
  4.         print('Negative number!')
  5.         break
  6.     else:
  7.         result = number * 2
  8.         print(f'Result: {result:.2f}')
  9.  
Advertisement
Add Comment
Please, Sign In to add comment