Download Python Beginning Numbers Lesson-Review

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Regular expression wikipedia , lookup

JavaScript syntax wikipedia , lookup

?: wikipedia , lookup

Python syntax and semantics wikipedia , lookup

Python (programming language) wikipedia , lookup

Transcript
Python Beginning Numbers Lesson
May 6, 2014
Learn to Program using Python
Let's Do Numbers
Review Questions
1. Python programming comments are ignored by the computer, True or False?
2. Just like in C, C++, and Java, a Python comment begins with two slash characters (//) and continues to
the end of the line, True or False?
3. The only prompt used by the Python interactive system is the one consisting of three right-angle
brackets (>>>), True or False?
4. The output produced by the Python interactive system appears on a line without either of the prompts
mentioned above, True or False?
5. If you enter an expression at the prompt and press the Enter key, the result of evaluating the
expression will be displayed on the next line without a prompt, True or False?
6. Computer programs are composed of expressions, which are made up of statements, True or False?
7. In the following expression, 2+5, what is the common jargon for the plus sign, and what is the
common jargon for the 2 and the 5?
8. List the operators discussed in this lesson, and describe the purpose of each.
9. Integer division produces a decimal result, True or False?
10. Describe how to force Python division to produce a decimal result.
11. The modulus operator is used to produce the quotient in division, True or False?
12. Describe the use of parentheses in expressions.
13. Describe how Python evaluates an expression containing parentheses.