Monday, 20 May 2013

Third Day At Python's

Today's Exercises

At Beginner in Python today, there was a couple of new techniques learned.

Math Operations

This is learning how to do basic math opereation  with the Python programming language. It is really symple. Check this codes: 
number=2+1
print number

This code adds the sum of two integers.

Tip Calculator

 This is a kind of calculator that give you the exact tip to be given at a restaurant. So it means you don't have to worry. Check this sample:

meal=44.50
tax=0.0675

# The tip for this restaurant is 15% 
tip=0.15

meal=meal+meal*tax

#Print the results
total=meal+meal*tip
print total

String

A string is a



No comments:

Post a Comment