0

Why does this code print ((23+27+18)*2) not work on the "brain freeze" challenge in python core but this code

print ( 23 * 2 + 27 * 2 + 18 * 2 ) does work ? Can somebody tell me please??

20th May 2021, 5:28 AM
Abhinav P S
Abhinav P S - avatar
3 Respostas
+ 1
I think both works, but the result is not the same, print((23+21+18)*2) print( 23 * 2 + 27 * 2 + 18 * 2 ) The second number in the first 'print' statement is 21 while it is 27 for the second. When I checked it the result is like this: 124 136
20th May 2021, 5:39 AM
Endalk
Endalk - avatar
0
it does seem to print a number. is the number wrong, or is it not printing. if it is not printing maybe remove the space between print and ( do it is like print(...)
20th May 2021, 5:35 AM
you are smart. you are brave.
you are smart. you are brave. - avatar
0
Both stmts work fine.. print ((23+21+18)*2) #124 print ( 23 * 2 + 27 * 2 + 18 * 2 ) #136 There's no problem in them at all.
20th May 2021, 5:39 AM
sarada lakshmi
sarada lakshmi - avatar