DEV Community

Cover image for Simple Mathematics With Python
Palash Bauri 👻
Palash Bauri 👻

Posted on • Updated on

Simple Mathematics With Python

The Reason we Code is to solve Problems

.

Programming is not all about Mathematics, it's about solving problems we face in our daily life, and doing so we sometimes need Mathematics.

So let's do some simple Mathematics with Python, we've chosen Python because it's easy to learn and has a clear syntax.

I recommend reading my previous article about starting with python https://palash.tk/Simple-Introduction-To-Python-Programming, read that before going further if you're new to Programming or Python

So let's start..

Start Python

If you've python installed locally run IDLE otherwise use online interpreter like Repl.It

If You've Opened IDLE or Other REPL you'll see a prompt like this,

>>>

If you're using Repl.It, on the right pan you'll also see a prompt like

>

If nothing wrong happened, goto the next chapter.
If you find any problems please comment below the article, I'll surely help you

Simple Calculations With Python 👀

If you've successfully completed the previous chapter, now you have a >>> or > prompt on your screen.

In the >>> type 1+2 and press enter. If you've done everything correctly you'll see a output of 3

Try other,

  • Addition ,
    >>> 1 + 30 + 2
    You'll get 33

  • Subtraction,
    >>> 9-8
    You'll get 1

  • Multiplication ,
    >>> 9 * 11
    You'll get 99

  • Division ,
    >>> 444/2
    You'll get 222.0

Let's Do a Complex Calculation ✊

(123456789 + 987654321) * 8

Looking for the answer?

I'll not tell you, find Yourself using Python 😉 if you're able to find it , comment your answer below in the comment box 👇.

That's the fun of Programming 😁


Hey Guys I have a kind request, please follow me on twitter @bauripalash , I feel very lonely there 😢


That's it for now friends , see you next time. Till then let me know your thoughts, suggestions and questions in the comments below 👇


If You Like My Work (My Articles, Stories, Softwares, Researches and many more) Consider Buying Me A Coffee ☕ 🤗

Top comments (1)

Collapse
 
jainish06915235 profile image
Jainish Patel

Definitely, phython is powerful programming language rather than other programming language. You can read more about phython programming.