I don't know why I get an error.

Asked 2 years ago, Updated 2 years ago, 101 views

print="Hello! This is pie coffee that stir-fry fragrant coffee beans. Please choose a language!")      
language=int (input('1. Korean 2.english 3.')語本')

def coffee(c):

  if language == 1:  

     if c==1:
        a=1500
     elif c==2:
        a=1500
     elif c==3:
        a=2100
     elif c==4:
        a=2500
     elif c==5:
        a=2400
     return a


def size(s):

  if language == 1: 

     if s ==1:
        b=500
     elif s ==2:
        b=1000
     return b
def topping(t):

  if language == 1: 

              if s ==1000
                 c=1000
              elif s ==2:
                 c=1500
              elif s ==3:
                 c=500
              elif s ==4:
                 c=1500
              return b
              def price(a,b,c):
              pay=a+b+c
              return pay

print ("Please choose a menu!")

c= int ('menu: 1. Americano / 2. espresso / 3. cafe latte / 4. milk tea / 5. cafe mocha')

s= int(input('size: 1.regular / 2 large')

t= int ('Add toppings: 1. Tapioca pearl / 2. Jelly pearl / 3. Bubble / 4. Coconut pearl')
a= coffee(c)

b= size(s)

c= topping(t)       

print("Total amount is", price(a,b,c), "won")

print ("The drink is coming soon." It's hot, so be careful!")             

I'm not sure because I'm a Python beginner. It says invalid error, but I don't know what's wrongTT: From the very beginning, def comes out red as an error.Does anyone know what's wrong?Please...Please let me know

error invalid python3.7

2022-09-22 18:43

1 Answers


2022-09-22 18:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.