Today I started coding with python on codeacademy.org. From what I understand python is one of the simplest, most concice, most profitable language out there. Day 1 I learned about strings, variables, and true and false statements. As a spinoff of one of the courses, I wrote a tip calculator:
print "This is a tip calculator"
dinner= raw_input ("How much did you spend on dinner in cents [make sure that this number enters without decimal places.]")
dinner= int(dinner)
tip= raw_input ("How much do you want to tip in percent [again, enter without decimal places]")
tip =int(tip)
tip=tip/100
tip=dinner*tip
print tip
Comments