What the hell is wrong in my print function ?¿? code in description with output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What the hell is wrong in my print function ?¿? code in description with output

register = {"Aditya":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Atharva":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Amir":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Tanishq":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Ratan":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Samyak":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Varun":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30} print(register["Aditya"]) Output:- File "source_file.py", line 3 print(register["Aditya"]) ^ SyntaxError: invalid syntax Process finished with exit code 1.

15th Feb 2021, 12:30 PM
Tanishq Kamble
Tanishq Kamble - avatar
2 Answers
+ 4
Just add another curly bracket at the end of your dictionary and it should work.
15th Feb 2021, 12:47 PM
noteve
noteve - avatar
+ 5
Please don't use bad words here. Follow the rules of solo learn https://www.sololearn.com/discuss/1316935/?ref=app
15th Feb 2021, 4:20 PM
Aysha
Aysha - avatar