Following table shows practical examples to understand how basic arithmetic operator works.
Before | Statement | After | Remarks | |
---|---|---|---|---|
x | y | x | ||
Assignment | ||||
10 | 3 | x = y | 3 | |
Add/Substract/Multiply/Divide | ||||
10 | 3 | x = x + y | 13 | Addition |
10 | 3 | x = x - y | 7 | Subtraction |
10 | 3 | x = x * y | 30 | Multiplication |
10 | 3 | x = x / y | 3.3333333333333335 | Division |
10 | 3 | x = x ** y | 1000 | Power (103) |
10 | 3 | x = x % y | 1 | Reminder of the Division |
Shorthand Add/Substract/Multiply/Divide | ||||
10 | 3 | x += y | 13 | Shorthand Addition |
10 | 3 | x -= y | 7 | Shorthand Subtraction |
10 | 3 | x *= y | 30 | Shorthand Multiplication |
10 | 3 | x /= y | 3.3333333333333335 | Shorthand Division |
10 | 3 | x **= y | 1000 | Shorthand Power (103) |
10 | 3 | x %= y | 1 | Reminder of the Division |
Best casino games you can play for free dafabet dafabet 메리트 카지노 주소 메리트 카지노 주소 87Play Stevenhills Odds On How to Win At - Konicasino
ReplyDelete