Python Mortgage Calculator Program

Lesson 2 - Very simple 'programs'Introduction. OK! We have python installed, now what?

Python Mortgage Calculator Program In Java

Well, we program! And it is that simple (at least for now).

Python makes it easy to run single lines of code - one- liner programs. Lets give it a go. Opening IDLEGo to the start menu, find Python, and run the program labelled 'IDLE' (Stands for Integrated Development Environment. Now you are in the IDLE environment.

Find out the difference in interest between a fixed payment and the minimum credit card payment with bankrate.com's financial calculator.

This is the place you will be spending most time in. Here you can open a new window to write a program, or you can simply mess around with single lines of code, which is what we are going to do. Type the following and press enter: (don't type > > > as it should already be there)Code Example 1 - Hello, World! Hello, World!". What happened? You just created a program, that prints the words 'Hello, World'.

The IDLE environment that you are in immediately compiles whatever you have typed in. This is useful for testing things, e. That will come in a later lesson, though. Math in Python. Now try typing the stuff in bold.

You should get the output shown in blue. I've given explainations in brackets.

Python Mortgage Calculator Program Download

Code Example 2 - Maths. These are additions). Multiply, rabbits!). Exponentials e. g. The commas seperating each section are a way of. As you see, there is the code, then the result of that code. I then explain them in brackets.

Python Mortgage Calculator Program

Bangladesh2000.com: Bangladesh History, Bangla Music, bangla music video, mini movies, Tourism, slideshow, chatroom, Postoffice, Info directory, bangla midi music. Very simple 'programs' Introduction. OK! We have python installed, now what? Well, we program! And it is that simple (at least for now). Python makes it easy to run. Mortgage calculators are automated tools that enable users to determine the financial implications of changes in one or more variables in a mortgage financing. Online scientific calculator, mobile apps, and a rich collection of free online calculators, including mortgage, loan, BMI, ideal weight, body fat calculators and.

These are the basic commands of python, and what they do. Here is a table to clarify them (because tables look cool, and make you feel smarter ; ) ): Table 1 - Python operatorscommandnameexampleoutput+Addition.

Subtraction. 8- 5. Multiplication. 4*5. Division. 19/3. 6%Remainder.

Exponent. 2**4. 16. Remember that thing called order of operation that they taught in maths? Well, it applies in python, too. Here it is, if you need reminding: parentheses ()exponents **multiplication *, division \, and remainder %addition + and subtraction - Order of Operations. Here are some examples that you might want to try, if you're rusty on this: Code Example 3 - Order of Operations. In the first example, the computer calculates 2 * 3 first, then adds 1 to it.

This is because multiplication has the higher priority (at 3) and addition is below that (at lowly 4). In the second example, the computer calculates 1 + 2 first, then multiplies it by 3.

This is because parentheses (brackets, like the ones that are surrounding this interluding text ; ) ) have the higher priority (at 1) and addition comes in later than that. Also remember that the math is calculated from left to right, UNLESS you put in parentheses. The innermost parentheses are calculated first.

Watch these examples: Code Example 4 - Parentheses. In the first example, 4 - 4. In the second example, 4. Comments, Please.

The final thing you'll need to know to move on to multi- line programs is the comment. Type the following (and yes, the output is shown): Code Example 5 - comments. I am a comment. Fear my wrath!

A comment is a piece of code that is not run. In python, you make something a comment by putting a hash in front of it. A hash comments everything after it in the line, and nothing before it. So you could type this: Code Example 6 - comment examples. Comments are important for adding necessary information for another programmer to read, but not the computer.

For example, an explanation of a section of code, saying what it does, or what is wrong with it. You can also comment bits of code by putting a # in front of it - if you don't want it to compile, but cant delete it because you might need it later. Conclusion. There you go! Lesson 2 Completed. That was even shorter than lesson 1!

Next lesson, we make programs with many lines of code, and save them, so we can actually send them to people. That's right, you don't have to retype every program you run! What an amazing innovation!

Thanks to all,sthurlow.