What I should do in the last line? Im facing missing triple quotes. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What I should do in the last line? Im facing missing triple quotes.

print("Percentage Calculator") print('''') secured_mark = input("Enter secured mark:") total_mark= input("Enter total mark:") percentage= int(secured_mark)*100 / float(total_mark) print(""") print("You have" ,percentage,"%") if(percentage>60.00): print(""") print("First Division") else: print(""") print("Second Division")

16th Jun 2019, 5:52 AM
Akil 🇧🇩
Akil 🇧🇩 - avatar
3 Answers
+ 15
Hello !! You are facing this error because you are adding 3-4 quotes (single quotes in line 2 are four and double quotes in lines 6,9,12 are three) which are unnecessary. Just make two quotes everywhere. This is the reason you're getting that error message.
16th Jun 2019, 6:10 AM
Nova
Nova - avatar
+ 9
Some modifications in your code : print("Percentage Calculator \n") secured_mark = input("Enter secured mark:") total_mark= input("Enter total mark:") percentage= int(secured_mark)*100 / float(total_mark) print("\nYou have" ,percentage,"%\n") if(percentage>60.00): print("First Division") else: print("Second Division") Instead of writing print( " ") every time , just write \n( backslash n ). It will change the line to a new one. (\)Backslash is just the opposite of(/) slash And also the print statement in the last line should be inside the else statement because of indentation. Thanks
16th Jun 2019, 6:22 AM
Prince PS[Not_Active]
Prince PS[Not_Active] - avatar
+ 5
Ohh,thanks elder.
16th Jun 2019, 6:15 AM
Akil 🇧🇩
Akil 🇧🇩 - avatar