Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def found_datatype(type_, char):
- if type_ == 'int':
- datatype = int(char) * 2
- return datatype
- elif type_ == 'real':
- datatype = float(char) * 1.5
- datatype = f'{datatype:.2f}'
- return datatype
- else:
- datatype = f'${current_command}$'
- return datatype
- current_string = input()
- current_command = input()
- print(found_datatype(current_string, current_command))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement