# ------------------------------------------------------------ #Student: Austin Wells #Class: CIS122 #Date: 4/22/2015 #Program Title: Chapter 5 Programming Excercise 5.py #(Tuition Increase) #Program Description: This program will display the semester tuition #amount for the next five years. # ------------------------------------------------------------ TUITION_INCREASE_PERCENT = .2 BASE_TUITION = 6000 # Prints out the tuition for the next 5 years def printTuition(): tuitionAmount = BASE_TUITION for i in range(1,6): tuitionAmount += BASE_TUITION * TUITION_INCREASE_PERCENT print 'The tuition amount for year {} is ${:0,.2f}' .format(i,tuitionAmount) #main driver function def main(): printTuition() main()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question