Navaneet's Chapter 2 Exercises

by Navaneet Galagali

18 Jan 2016

Exercise 2:

Exercise 3:

Exercise 5:

These exercises helped me become familiar with basic input/output functions in Python. I think Trinket (which is where I am running these programs) is running an older version of Python (not Python 3.0) because when I typed “print(‘Some text’)”, the output included the parentheses. I read in Python’s docs that as of Python 3.0, the “print” statement was replaced with a print function, so I would think that including the parentheses would be necessary to print anything and that printing without the parentheses would give an error. For this assignment however, I didn’t put parentheses for my print statements.

I like to play tennis and run. Find Navaneet Galagali on Twitter, Github, and on the web.