if statement

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

4/1/2020 11:05:01 AM


7 Answers

New Answer


Mani You code should be like this print("Welome To Vidya Vikas Institue of Engineering aAnd Tehnology") branch= input("Enter Your Branch:") if(branch=="ECE"): print("YOu belong to 'A' Section") Now compare,you will find the difference/mistake


Because there is no use of these statements that's why I commented these statements. even you can remove these statement


Mani check out this edited code https://code.sololearn.com/c59p7y0QKTwb/?ref=app


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)


Why did you use # for A,B,C,D,E


Please use " " quotes in string .. Like if branch=="ECE":


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)