Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Simple maths in python
- ## Note: You can not add a string and a integer together it will cause a error and your program will crash, the computer does not understand what you are asking it to do.
- A = 4
- B = 6
- C = A + B
- print(C)
- #>>> 10
- #We have set 3 variables up, A = Integer, B = Integer, C = Integer+Integer which returns 10 as 6 + 4 = 10
- A = 10
- B = 5
- C = A - B
- print(C)
- #>>> 5
- # Now we have done the same as last time, but this time we have subtracted the integers.
- A = 20
- B = 5
- C = 20 * 5
- print(C)
- #>>> 100
- # This time we have multiplied the two variables
- A = 20
- B = 2
- C = 20 / 2
- print(C)
- #>>> 10
- # We have now divided the two variables
- # This is just the basics of some of the math you can do within python, i say some, but you can do a lot of math in python.
- # Soon i will start to create videos on this series, but i would like to get the basic out of the way so must people have a basic understanding of python before we start our Twitter bot program.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement