Advertisement
Guest User

Untitled

a guest
Feb 5th, 2021
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. type_data = input()
  2. data = input()
  3.  
  4. def types(command, s):
  5. if command == 'int':
  6. index = int(s)
  7. result = index * 2
  8. print(result)
  9. elif command == 'real':
  10. index = int(s)
  11. result = index * 1.5
  12. print(f'{result:.2f}')
  13. elif command == 'string':
  14. print(f'${s}$')
  15.  
  16. types(type_data, data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement