what does print function do ? the print creates a paranthesis | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what does print function do ? the print creates a paranthesis

tamil= int(input()) english = int(input()) math = int(input()) science = int(input()) social = int(input()) print("your tamil mark is:",tamil) print("your english mark is:",english) print("your math mark is :",math) print("your science mark is:",science) print("your social mark is:",social) avg = tamil+english+math+science+social average = 'your total marks are ',avg print(average) #print("your total:",avg) mean = int(avg/5) #print("your percent:",mean) abc = 'your percentage',mean print(ab

8th Feb 2022, 1:57 PM
Vignesh G
Vignesh G - avatar
3 Answers
+ 2
It's not by print. You are making a tuple there by average = 'your total marks are', avg This creates a tuple. Not string.. check print(type(average) ) # you know tuple are enclosed in parentheses, it's default. To form string, you can use average = f'your total marks are {avg}'
8th Feb 2022, 2:10 PM
Jayakrishna 🇮🇳
0
Question is not clear print display data on output console
8th Feb 2022, 2:00 PM
Jayakrishna 🇮🇳
0
in average = 'your....' the code gives a parenthesis sorry for unclear question I tried to frame question but unable to complete.. copy paste in your solo console to to
8th Feb 2022, 2:02 PM
Vignesh G
Vignesh G - avatar