if statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

if statement

https://code.sololearn.com/cf86TKhxlfTJ/#py Can anyone help me with what mistake I made ?? and help me sort it out

1st Apr 2020, 11:05 AM
Mani
Mani - avatar
4 Answers
0
https://code.sololearn.com/chvLQrssON4m/?ref=app Bro, in this one Correct me And show me what should I add so that as I enter a branch name i get my section (A or B or C)
1st Apr 2020, 11:46 AM
Mani
Mani - avatar
0
Why did you use # for A,B,C,D,E
1st Apr 2020, 11:59 AM
Mani
Mani - avatar
0
Please use " " quotes in string .. Like if branch=="ECE":
2nd Apr 2020, 5:20 AM
ANJALI SAHU
0
change the print statement to print(branch) instead of print(“branch”). the intention is to print the branch entered by user and not the name branch itself. and also change your else statement too. ex: if user enters invalid branch name as “egs” invalid then if your intention is to print this “Invalid branch entered, egs” you should change your else statement to else: print(“invalid branch entered”, branch)
2nd Apr 2020, 6:36 PM
pranavi Reddy
pranavi Reddy - avatar