0

Send me if else statement code .the tuffest one

Please

25th Sep 2020, 2:44 PM
Round Up Kid
Round Up Kid - avatar
28 Antworten
+ 8
the variable coursework is not defined, so you get a NameError.
25th Sep 2020, 3:17 PM
Lothar
Lothar - avatar
+ 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..!!
25th Sep 2020, 3:27 PM
Srishti
Srishti - avatar
+ 2
No..! u'll get a name error
25th Sep 2020, 3:24 PM
Srishti
Srishti - avatar
+ 2
Iron Man Indent it properly... x=man If x==man: Print ('yes') else: Print('no') This one works out....
26th Sep 2020, 5:17 AM
Sreenandan K M
Sreenandan K M - avatar
+ 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")
26th Sep 2020, 5:25 AM
Sreenandan K M
Sreenandan K M - avatar
+ 2
It is working thank you
26th Sep 2020, 5:29 AM
Round Up Kid
Round Up Kid - avatar
+ 1
Yes Now it says different things I don't know it is working or not But no error now
25th Sep 2020, 3:30 PM
Round Up Kid
Round Up Kid - avatar
+ 1
Thank yoi
25th Sep 2020, 3:30 PM
Round Up Kid
Round Up Kid - avatar
+ 1
For every bit of code, therer can be a more complex one.
25th Sep 2020, 10:56 PM
Sonic
Sonic - avatar
+ 1
Iron Man thank you
26th Sep 2020, 5:06 AM
Round Up Kid
Round Up Kid - avatar
+ 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
26th Sep 2020, 5:20 AM
Round Up Kid
Round Up Kid - avatar
+ 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
26th Sep 2020, 8:24 AM
Round Up Kid
Round Up Kid - avatar
0
Thank you
25th Sep 2020, 2:51 PM
Round Up Kid
Round Up Kid - avatar
0
Unfortunately it's not working Maybe it's my pydriod It's not working if else statement
25th Sep 2020, 2:54 PM
Round Up Kid
Round Up Kid - avatar
0
No it's not running
25th Sep 2020, 3:14 PM
Round Up Kid
Round Up Kid - avatar
0
Traceback error
25th Sep 2020, 3:14 PM
Round Up Kid
Round Up Kid - avatar
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?
25th Sep 2020, 3:21 PM
Round Up Kid
Round Up Kid - avatar
0
wht error exactly u are getting?
25th Sep 2020, 3:23 PM
Srishti
Srishti - avatar
0
Traceback error
25th Sep 2020, 3:23 PM
Round Up Kid
Round Up Kid - avatar
0
I have screenshot uploading in web There you see what problem I'm facing Wait
25th Sep 2020, 3:25 PM
Round Up Kid
Round Up Kid - avatar