Computer Learning

All About Computer And Technology

  • Home
  • Python Programming
    • How To Find Maximum And Minimum Value On Python Programming Language
    • Creating Tuple, List, and Dictionary on Python Programming Language
    • Learning about Input value using Python easily
    • Creating Function on Python Programming Language
    • Read More >>
  • Komputer
    • Program Execution (Organization and Architecture Computer)
    • Microcontroller of Von Neumann vs Havard and CISC vs RISC
    • Definition and Function of Control Unit
  • Blog Tutorial
    • How to Make Table of Content with Sroll in Blogspot
    • How to make Claim or Get Verification Our Blogs to Alexa
  • Tips dan Trik
    • How To Solve Red Cross In Blackberry
    • How to Restore Deleted File in Smartphone Memory Using Recuva
    • Selengkanya >>
  • Contact Me
Home » Python Programming Language » How to Write Matematics Formulas on Python Programming Language

How to Write Matematics Formulas on Python Programming Language

Joni
11 Comments
Python Programming Language
Tuesday, July 22, 2014



Good night all programmers? 
As my writing before about Learning if, for, and while function on Python Programming Language, I will continue my next writing on Python learning. We are going to study some mathematics formulas that we can make on Python programming language. As like we know, base formulas of Mathematics are multiplication, division, summation and subtraction. The sequence of the base formulas is as same with the mathematics formulas priority of themselves. It means that the highest priority is multiplication, followed by division, then summation, and the last is subtraction. For example :

2 + 8 x 3 = 26 (correct)
2 + 8 x 3 = 30 (incorrect) 

Do you know the reasons why the correct result of the calculation above is 26 ? why not 30 ?As I have described recently that priority influence the result. The example above, there are two calcualting operations, they are summation and multiplication. If we look the priority, multiplication is higher than summation. So, the first executed of the calculation is multiplication, the next is summation. It is different when the summation of numbers in brackets. For example :

(2 + 8) x 3 = 30 (correct) 

The result of the calculating operation is correct because bracket is more prioritied than others. And then, how the mathematics formulas are written on Python ? Actually, the rules of calculating operation on Python is almost same with mathematics formulas as generally. I will give you an example below. Don’t forget to open the IDLE of Python, just write scripts on Interactive Mode :


The example above is all of mathematics formulas with integer numbers (type integer). If you calculate decimal numbers (type float), the result is also decimal numbers.You can see the example below on Interactive Mode :

OK friends, I think it is easy to be understood. So, we will continue our learning. The next topic of my writing today is degree, root, and remainder of division.We need to see this example immediately :

Explanation :
  1. Degree formula on Pyhton is x**y where x is number that will be powered and y is the power.
  2. The scripts above show that we have to import modul first to be able use root function. On Python, named modul had provided in lib directory. You can see some moduls that had provided in :data C/Python 2.7/lib/
    I will describe the script of “from math import sqrt as root” it means that we import sqrt function/formula from math modul where sqrt function itself is root function. Then, the sqrt function is represented by root (the name is up to you friends, it means you can change the name for example bob or others).
  3. Remainder of division (%). On the example above, we look var a = 17, then var b = 17 % 3 it means 17 is divided by 3 get 5 with remainder 2. From mathematics operation, the result is taken from the remainder of the division.
That is base mathematics formulas that we learn today. By understanding this base formulas, we could make triangle formula, square formula, cube formula, circle formula, and so on.On my next writing, I am going to share about some advanced mathematics formulas as like I mention above. The point, just truly understand this base formulas so that you can learn more advanced formulas easier, OK please study hard my friends. ;)
Tweet
How to Write Matematics Formulas on Python Programming Language Title : How to Write Matematics Formulas on Python Programming Language
Description : Good night all programmers?  As my writing before about Learning if, for, and while function on Python Programming Language, I wil...
Rating : 5

11 Responses to "How to Write Matematics Formulas on Python Programming Language"

Kayal said...

Well Done! I am very glad to see your article and very attractive to me. Regularly following your blog, so please update more new one post.

Unix Training in Chennai
Unix shell scripting Training in Chennai
Excel Training in Chennai
Corporate Training in Chennai
Embedded System Course Chennai
Linux Training in Chennai
Tableau Training in Chennai
Unix Training in Chennai
Unix shell scripting Training in Chennai

March 5, 2019 at 1:53 PM
luckys said...

english to hindi typing   

July 8, 2019 at 10:46 PM
Fasts News said...

메이저토토사이트

July 24, 2019 at 11:57 PM
leadmirror said...

Nice article
Thanks for sharing the information
Please visit the leadmirror to know your blog rank on the google
https://www.leadmirror.com/pricing/explorer

September 20, 2019 at 2:35 PM
Susmita Sen said...

I liked your blog. Thanks for your interest in sharing the information. keep updating.
CCC Question Paper

February 23, 2020 at 11:37 AM
Susmita Sen said...

good Swachata par Nibandh

February 23, 2020 at 11:37 AM
BCA App said...

Thanks for posting such a blog it is really very informative. And useful for the freshers Keep posting the
updates.

BCA Notes

September 30, 2020 at 12:51 AM
Prashant Baghel said...

WhatsApp Account ???? ??? ??? 2021
Pradhan mantri suraksha bima yojana in hindi
Pubg mobile ko kaise download karen 2021
Jio Phone 3 Price 1500 Booking Online - Full Specification Details
Bharat Mein Kul Antarrastriye Stadium Kitne Hain 2021

June 9, 2021 at 6:05 PM
Free CSEET Online Classes said...

It's been our pleasure to inform you that our institution is offering a great deal by giving CS executive classes and a free CSEET class only for those who are interested in gaining knowledge. So what are you waiting for contact us or visit our website at https://uniqueacademyforcommerce.com/

July 15, 2021 at 7:09 PM
Unknown said...

This is an excellent tip especially to those new to the blogosphere. Short however exact data… Thank you for sharing this one. An unquestionable requirement read post! tech updates

July 27, 2021 at 1:57 PM
kishor said...

nices information thanku so much
kishorsasemahal
click here

August 13, 2021 at 11:11 PM

Post a Comment

← Newer Post Older Post → Home
Subscribe to: Post Comments (Atom)

Popular Post

  • Program Execution (Organization and Architecture Computer)
    How to read this figure below ?  Notes  : Program Counter (PC) = Address of Instruction  Instruction Register (IR) = Ins...
  • How to Write Matematics Formulas on Python Programming Language
    Good night all programmers?  As my writing before about Learning if, for, and while function on Python Programming Language, I wil...
  • Microcontroller of Von Neumann vs Havard and CISC vs RISC
    Microcontroller of Von Neumann vs Havard and CISC vs RISC | pemprograman | komputer | bahasa python Microcontroll...
  • How to Use If, For, and While on Python Programming Language
    Welcome back to my page guys !    I’m happy to meet you again my friends because you all are the next generation on this country. We ...
  • How To Find Maximum And Minimum Value On Python Programming Language
    On my writing before, you have learned about tuple, list, and dictionary. You have to truly understand the topics before continuing to nex...
  • Contact Me On
    Contact Me on : e-mail : joni67676@gmail.com Facebook : John Twitter : @simplechilds Google + : Jhon Gu...
  • Creating Tuple, List, and Dictionary on Python Programming Language
    We have learned about Creating Function on Python Programming Language on my writing before. Now, we have to know how to collect a sequenc...
  • Definition and Function of Control Unit
    Definition and Function of Control Unit | pemprograman | komputer | bahasa python Control unit control CPU opera...

Label Cloud

  • Blog Tutorial
  • Komputer
  • Python Programming Language
  • Tips Trick

Blog

  • ▼  2014 (15)
    • November 2014 (1)
    • October 2014 (1)
    • September 2014 (3)
    • August 2014 (3)
    • July 2014 (7)

Followers

Mengenai Saya

Joni
View my complete profile
Back to top!
Copyright 2013 Computer Learning - All Rights Reserved Design by Mas Sugeng - Powered by Blogger