WSQ03-Fahn with numbers

In today’s post we’re having fahn with numbers. We’re back on our elementary school days, learning how to sum, subtract, multiply, divide, get the division’s remainder, etc., we know our stuff when coming  to this, right? But what about python?… Well, doing arithmetical operations in python is much more easy, just learn how to ask for it and python will do it for you :

———————————————————————-

Screen Shot 2016-02-08 at 12.26.42 PM

———————————————————————-

There, we’re making a sum, right? but wait!

———————————————————————-

Screen Shot 2016-02-08 at 12.32.24 PM

———————————————————————-

Our program doesn’t do anything at all… Well, duh, we’re not printing anything, so this should do it :

———————————————————————-

Editor :

Screen Shot 2016-02-08 at 12.26.42 PM

Terminal :

Screen Shot 2016-02-08 at 12.40.11 PM.png

———————————————————————-

Yeah, there. 2 + 1 = 3, that’s right… right?… google cal… 2 + 1… yep, that’s 3. Great, so that’s how it’s done. now lets try all the other operations:

———————————————————————-

 

CC BY-SA 4.0 WSQ03-Fahn with numbers by esenombredeusua is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.