Find output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Find output

what os output >>>x=5 >>>y=x+3 >>>y=int (str (y)+"2") >>>printf (y)

5th Jan 2018, 8:07 AM
lal bahadur Verma
lal bahadur Verma - avatar
4 Answers
+ 1
last line it's print not printf answer is 82
5th Jan 2018, 8:12 AM
‎ ‏‏‎Anonymous Guy
+ 1
x=5 y=5+3 = 8 y = int( str(y)+ "2") ... here you are converting y into a string and when two strings are added they are joined. here str(y) + "2" = "8"+"2" ( "2" is is also a string ) = "82" now int() converts 82 into an integer finally you print the value of y which is the number 82 note: first inner bracket is resolved then the outer ones i hope this clears your doubt
5th Jan 2018, 8:51 AM
‎ ‏‏‎Anonymous Guy
0
plz explain
5th Jan 2018, 8:14 AM
lal bahadur Verma
lal bahadur Verma - avatar
0
thanks so much
5th Jan 2018, 9:10 AM
lal bahadur Verma
lal bahadur Verma - avatar