dimanche 24 novembre 2019

my code is not working and it only says syntax error

i tried couple of things but does not work. the problem is in the 11th line(that's what python said). i am still 14 and do not have a big knowladge on programing. hope i can get some help

 def crowbar():  
   print("nice, so you picked the crowbar, and now you have to get out of the car")  
   randomNum = random.randint(1,10)  
   if randomNum == 2 or 4 or 6 or 8 or 10:  
       print(" shoo, those 2 people are walking away. now it's the time to get out of here")  
   elif randomNum == 1 or 3 or 5 or 7 or 9:  
        print("they are coming at your direction. you have to do something and fast")  
        choise2 = int(input("""  
                    1)hit them with the crowbar  
                    2)pretent that you are still unconcious""")  
          if choise2 == 1: #the problem has something to do with this line 
                print("ok")  
          elif choise2 == 2:  
                 print("not ok")  

Aucun commentaire:

Enregistrer un commentaire