0

why we r not getting answer bye using %. and // in print

explain me

1st Aug 2016, 5:45 PM
Dinesh Kumar
Dinesh Kumar - avatar
4 Respostas
+ 1
I'm not sure I understand your question but I think you're asking about the C language syntax. Something like : printf("test number %d", 1); //output : 'test number 1' The answer simply is that every language has it's own syntax. printf() is used in C. Not in python.
1st Aug 2016, 7:26 PM
Alireza M
Alireza M - avatar
0
no-no print("2 + 2") print("5 ℅ 2") while running above two strings getting answer for 1st one as 4 , but not getting answer for 2nd one
2nd Aug 2016, 2:10 AM
Dinesh Kumar
Dinesh Kumar - avatar
0
>>> print ("2 + 2") 2 + 2 >>> print ("5 % 2") 5 % 2 >>> print (2+2) 4 >>> print (5%2) 1 Use %, not ℅.
2nd Aug 2016, 4:18 AM
aruluth
aruluth - avatar
0
can you explain in detail... print(5%2) should give you answer as 1. It does for me. print("5%2") will print 5%2.
4th Aug 2016, 11:09 AM
ajit nair
ajit nair - avatar