def calc_money(price, money, count):
total = 0
for i in range(1,count+1):
total += price * i
answer = total - money
return answer
price=3
money=20
count=4
ret = calc_money(price, money, count)
print(f"{ret}원이 부족합니다")
To embed this project on your website, copy the following code and paste it into your website's HTML: