0

elif var?

The code below keeps getting an error var = 100 if var == 200: print "1 - Got a true expression value" print var elif var == 150: print "2 - Got a true expression value" print var elif var == 100: print "3 - Got a true expression value" print var else: print "4 - Got a false expression value" print var print "Good bye!"

26th Jun 2020, 7:10 PM
Jah Revelo
Jah Revelo - avatar
2 Antworten
0
sl uses py 3x print syntax is, for example: print(var)
26th Jun 2020, 7:11 PM
Slick
Slick - avatar
0
var=100 if var =200: print("1- got a true value expression") elif var == 150: print("2-got a true value expression") elif var ==100: print("3- got a true value expression") else: print("4- got a true value expression") print ("good bye")
12th May 2023, 2:04 PM
CHAITU NAIDU
CHAITU NAIDU - avatar