0
who know the output if this code??
print(3++ + ++5) in interpreter what is output +-×÷
11 Answers
+ 21
My initial thoughts were that it would be throwing errors, since prefix/postfix operators do not exist in Python. But yeah, @Mohammad @Tobi should be correct.
+ 14
i agree with @Mohammad and @Tobi
+ 6
++ is a operator (increment) in javascript but python doesn't have ++ operator. maybe ++ indicating that the number is positive integer here. so 3 + 5 = 8
P.S. I am a newbie in python. Just started the lesson.
+ 6
My guess would be, that the the last four of the plusses are evaluated as the unary plus operator, which just does nothing on integers.
+ 3
8 is an output 😅😅😅
in my interpreter
Why not error
+ 3
@moon it's on C++.. Sorry 😮
0
@ nithiwat
correct answer!!
0
10 is an output
0
my interpreter is 8
0
why ?? help pls
this is python code
- 1
It'll be 9.
++5: increment to 6 and then execute the code.
5++: execute the code first, then increment to 6.
++3+++5=10
++3+5++=9
3+++++5=9
3+++++5=10
Hope you got it