Исправьте код | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Исправьте код

a = input("сколько заняли у человека?") b = input("вы уже отдали часть долга? да/нет") if b == "нет": print("вы должны: " +a) if b == "да": c = input("сколько вы отдали?") print(a-c) Исправьте его

22nd Feb 2023, 6:07 PM
Глеб Хомутовскс
Глеб Хомутовскс - avatar
1 Answer
+ 3
Глеб Хомутовскс a = int(input("how much did you borrow from the person?") ) b = input("have you already paid part of the debt? yes/no") if b == "no": print("you must: " +a) if b == "yes": c = int(input("how much did you give?") ) print(a-c) Що не так з кодом? input a & c change to int(input)
22nd Feb 2023, 6:38 PM
BroFar
BroFar - avatar