py_stepik/simplecalc.py

10 lines
591 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

print("Добро пожаловать!")
print("Это программа калькулятор")
a = int(input("Введите 1-е число: "))
b = int(input("Введите 2-е число: "))
print("Сумма равна:", a + b, sep="\n")
print("Разность равна:", a - b, sep="\n")
print("Произведение равно:", a * b, sep="\n")
print("Масса в граммах:", int(input("Введите массу в кг: ")) * 1000)
print("Скорость в м/с:", round(int(input("Введите скорость в км/час: ")) / 3.6, 2))