find the error python

Solutions on MaxInterview for find the error python by the best coders in the world

showing results for - "find the error python"
Giulia
25 Aug 2018
1print ("Welcome to the vending machine, type a product code: 1001 or 1002 ")
2product_code = int(input())
3KitKat_price = 2
4doritos_price = 2.5
5if (product_code == 1001):
6  print("You have selected" , + (product_code))
7  print("The price of the Kit Kat is 2$. Insert the neccesary coins")
8  customer_money
9  customer_money = int(input())
10  if customer_money == KitKat_price:
11    print("You have inserted 2$, KitKat is dispensing "
12  if customer_money > KitKat_price:
13    print("You have insterted more than 2$")
14  if customer_money < KitKat_price:
15    print("You have not inserted enough coins, instert more coins to get the KitKat")
16if (product_code == 1002): 
17  print("You have selected", + (product_code))
18  print("The price of the doritos is 2.5$. Insert the neccesary coins:")
19  customer_money = float(input())
20  if customer_money > doritos_price:
21    print("You have inserted more than 2.5$")
22  if customer_money < doritos_price:
23    print("You have not insterted enough coins, insert more coins to get the doritos")
24  if customer_money == doritos_price:
25    print("You have inserted 2$")
26    print("Doritos is dispensing")
27else:
28  print("You have not selected any product code")
29