Sichanov

10_multiply_by_2

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