+ 2
I Am beginner Show me the wrong In this code.
age = int(input()) if age <= 12: print("You are a child") else if: age <=25: print ("You are Young") else: print("You are middle age or old")
11 Respuestas
+ 7
above code so many indentation errors are there
please note if write anything before learn syntax errors
ex: ag=int(raw_input())
if ag<=12:
print ag
else:
print 'age is high'
I hope that this ishelpful for u
+ 7
here I wrote the complete code you can just copy and paste it in your idle
age = int(input())
if age <= 12:
print("You are a child")
elif age <=25:
print ("You are Young")
else:
print("You are middle age or old")
I hope that this is helpful for u
+ 5
in python else if written as elif condition:
+ 3
'else if' in python is writen as 'elif'
+ 3
age = int(input())
if age <= 12:
print("You are a child")
elif age <=25:
print ("You are Young")
else:
print ("You are middle age")
+ 1
Try elif age<=25: instead of else if:
age<=25:
+ 1
show how use Else if or elif Boorsu Brother
+ 1
age = int(input())
if age <= 12:
print("You are a child")
else:
if age <=25:
print ("You are Young")
else:
print("You are middle age or old")
#this should help you if you intend to use else statements.
#Otherwise you could use elif: in place of the first else statement.
age = int(input())
if age <= 12:
print("You are a child")
elif age <=25:
print ("You are Young")
else:
print("You are middle age or old")
Hoping I've been of great help Sir.
0
alexey brother please you write and run the code and give me solution
0
this is not python 3 just a heads up python 3 does not have raw input and needs parentheses for print
0
not bad😆