Advertisement
Spocoman

01. Data Types

Jan 31st, 2022
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. def solve (a = input(), b = input()):
  2.     out = ""
  3.     if a == "int":
  4.         out = int(b) * 2
  5.     elif a == "real":
  6.         out = f"{float(b) * 1.5:.2f}"
  7.     elif a == "string":
  8.         out = f"${b}$"
  9.     return out
  10. print(solve())
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement