0
why we r not getting answer bye using %. and // in print
explain me
4 Antworten
+ 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.
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
0
>>> print ("2 + 2")
2 + 2
>>> print ("5 % 2")
5 % 2
>>> print (2+2)
4
>>> print (5%2)
1
Use %, not ℅.
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.