Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number = float(input())
- value = input()
- valueOutPut = input()
- if value == "mm" and valueOutPut =="cm":
- number = number / 10
- elif value == "mm" and valueOutPut == "m":
- number = number / 1000
- elif value == "cm" and valueOutPut == "m":
- number = number / 100
- elif value == "cm" and valueOutPut == "mm":
- number = number *10
- elif value == "m" and valueOutPut == "cm":
- number = number * 100
- elif value == "m" and valueOutPut == "mm":
- number = number * 1000
- print(f"{number:.3f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement