0
Send me if else statement code .the tuffest one
Please
28 odpowiedzi
+ 8
the variable coursework is not defined, so you get a NameError.
+ 3
Round Up kid..
in this code you have to define coursework...
suppose
coursework = "English"
score_theory = 53
score_practical = 35
if(coursework == "Science" or coursework == "science"):
if(score_theory > 50):
print("Please check the input score for 'Science: Theory'.")
elif(score_practical > 50):
print("Please check the input score for 'Science: Practical'.")
else:
print("Score validated for Science. Your total is: ",score_theory + score_practical)
elif(coursework == "English" or coursework == "english"):
if(score_theory > 60):
print("Please check the input score for 'English: Theory'.")
elif(score_practical > 40):
print("Please check the input score for 'English: Practical'.")
else:
print("Score validated for English. Your total is: ",score_theory + score_practical)
else: print("Coursework not recognised. Please enter score for either Science or English.")
now this will work..!!
+ 2
No..!
u'll get a name error
+ 2
Iron Man Indent it properly...
x=man
If x==man:
Print ('yes')
else:
Print('no')
This one works out....
+ 2
Round Up Kid check out this one...
guessing_number =100
user_type = int(input("guess a number"))
if user_type == guessing_number:
print("you win")
else:
if user_type < guessing_number:
print("too low")
else :
print("too high")
+ 2
It is working thank you
+ 1
Yes
Now it says different things
I don't know it is working or not
But no error now
+ 1
Thank yoi
+ 1
For every bit of code, therer can be a more complex one.
+ 1
Iron Man thank you
+ 1
#plz correct my code
guessing_number =100
user_type = int(input("guess a number"))
if user_type == guessing_number:
print("you win")
else:
if user_type < guessing_number:
print("too low")
else :
print("too high")
#plz correct my code
+ 1
Nguyễn Thành Trung I get error of intendention
I don't know why but I press tab button then also
But it's okay now every thing is fine
0
Thank you
0
Unfortunately it's not working
Maybe it's my pydriod
It's not working if else statement
0
No it's not running
0
Traceback error
0
score_theory = 53
score_practical = 35
if(coursework == "Science" or coursework == "science"):
if(score_theory > 50):
print("Please check the input score for 'Science: Theory'.")
elif(score_practical > 50):
print("Please check the input score for 'Science: Practical'.")
else:
print("Score validated for Science. Your total is: ",score_theory + score_practical)
elif(coursework == "English" or coursework == "english"):
if(score_theory > 60):
print("Please check the input score for 'English: Theory'.")
elif(score_practical > 40):
print("Please check the input score for 'English: Practical'.")
else:
print("Score validated for English. Your total is: ",score_theory + score_practical)
else: print("Coursework not recognised. Please enter score for either Science or English.")
# I tried pydriod 3 app I also try solo learn app nothing works
#maybe it's my personal app problem
#how can I fix this?
0
wht error exactly u are getting?
0
Traceback error
0
I have screenshot uploading in web
There you see what problem I'm facing
Wait