Python – Arithmetic Operations Basics

One of the most used syntax in a language are the arithmetic operations. Operations like addition, subtraction, multiplication, division, and modulus are the basics. I created a program that shows the syntax for them. I first declared two variables namely x and y.  Then I performed the arithmetic operations using each variables in the following lines.

The code is below:
math1

 

Click run then select run module.

The output should be same as below:

 

math2

 

Thank you for reading this post.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s