+ 1

How can you substract negative numbers from negative numbers?

substract

21st Mar 2018, 9:44 PM
Miguel
4 Réponses
+ 6
You can just code it such as: print(-7 - -5)
21st Mar 2018, 9:50 PM
John Wells
John Wells - avatar
+ 6
(Subtracting minus from minus) -1 - -1 = 0 (adding minus to minus) -1 + -1 = -2
21st Mar 2018, 10:21 PM
D_Stark
D_Stark - avatar
+ 2
thank you all for your help
21st Mar 2018, 11:46 PM
Miguel
0
as you would subtract any other two numbers. e. g. print(-2 - (-4)) outputs 2
21st Mar 2018, 9:52 PM
hinanawi
hinanawi - avatar