0

If I want to do this:-1+2+4=7 how to write this in program?

addition of number

3rd Sep 2016, 7:51 PM
Viraj Thale
Viraj Thale - avatar
3 Respostas
+ 1
in a script write: sum = 1 + 2 + 4 print(sum)
3rd Sep 2016, 8:27 PM
Amarie
+ 1
in the interactive mode just enter 1 + 2 + 4, because you can use it as simple calculator.
3rd Sep 2016, 8:28 PM
Amarie
0
x = 1 y = 2 z = 4 sum = x+y+z print x+y+z print (1+2+4) print (sum)
3rd Sep 2016, 9:06 PM
beauty1234