Homework 1

Please answer each question in depth, providing as much detail as is reasonable. Feel free to copy the questions into Word or any other document editor in order to answer them.

1. How do loops and other decision methods reduce the amount of repetition in the code and why is this a good thing?

2. Why is naming your variables carefully, important in Python? What would happen if you changed the capitalization of a variable name in your program?

3. What does the built in range() function do in Python?

4. What is the difference between variable = 1 and variable == 1? Why is this an important distinction to understand?

5. What is concatenation? Which symbol in Python is used to cause two strings to be concatenated?

Comments are closed.