- 2

Why this code is showing syntax error. For (elif)

a=2 b=3 c=3 if a>b: print("â‚č") if b>c: print ("@") try: print ("yes") except: print("no") elif b>a: print("ok")

26th Jun 2020, 9:24 AM
ALL IN ONE GYAN
ALL IN ONE GYAN - avatar
5 Answers
+ 5
When you type try if loop ends ,so the elif you are using is without previous if
26th Jun 2020, 9:29 AM
Abhay
Abhay - avatar
0
I want to make a program which have similar format so I have to use try and except can you give me an alternate.
26th Jun 2020, 10:47 AM
ALL IN ONE GYAN
ALL IN ONE GYAN - avatar
0
I want that try condition in b>a condition
26th Jun 2020, 11:17 AM
ALL IN ONE GYAN
ALL IN ONE GYAN - avatar