Задание 6 из 20 параграфф 2.1
This commit is contained in:
parent
874c94d254
commit
99cfc8da54
13
lesson_6.py
Normal file
13
lesson_6.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'''***Задание 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
|
||||
Loading…
Reference in a new issue