We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print('Addition: ', 1 + 2) # 3 print('Subtraction: ', 2 - 1) # 1 print('Multiplication: ', 2 * 3) # 6 print ('Division: ', 4 / 2) # 2.0 Division in Python gives floating number print('Division: ', 6 / 2) # 3.0 print('Division: ', 7 / 2) # 3.5 print('Division without the remainder: ', 7 // 2) # 3, gives without the floating number or without the remaining print ('Division without the remainder: ',7 // 3) # 2 print('Modulus: ', 3 % 2) # 1, Gives the remainder print('Exponentiation: ', 2 ** 3) # 9 it means 2 * 2 * 2
Issue in the comment the output of 2 ** 3 is 8, not 9. The comment in the code is incorrect,
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Arithmetic Operations in Python
Integers
print('Addition: ', 1 + 2) # 3
print('Subtraction: ', 2 - 1) # 1
print('Multiplication: ', 2 * 3) # 6
print ('Division: ', 4 / 2) # 2.0 Division in Python gives floating number
print('Division: ', 6 / 2) # 3.0
print('Division: ', 7 / 2) # 3.5
print('Division without the remainder: ', 7 // 2) # 3, gives without the floating number or without the remaining
print ('Division without the remainder: ',7 // 3) # 2
print('Modulus: ', 3 % 2) # 1, Gives the remainder
print('Exponentiation: ', 2 ** 3) # 9 it means 2 * 2 * 2
Issue in the comment the output of 2 ** 3 is 8, not 9. The comment in the code is incorrect,
The text was updated successfully, but these errors were encountered: