project_python/lesson_6.py

13 lines
625 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.

'''***Задание 6 из 20 Параграф 2.1 ***************
* Для этого напишите программу, которая рассчитывает стоимость покупки и печатает чек в заданном формате.
'''
if __name__ == "__main__":
tem = input()
price = int(input())
weight = int(input())
money = int(input())
print('Чек', f'{item} - {weight}кг - {price}руб/кг', sep='\n')
print(f'Итого: {int(price * weight)}руб')
print(f'Внесено: {money}руб')
print(f'Сдача: {int(money - price * weight)}руб')i