Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. The expression 2*3 2 evaluates to wbich of the following values? a. 64 b. 512

ID: 3586856 • Letter: 1

Question

1. The expression 2*3 2 evaluates to wbich of the following values? a. 64 b. 512 d 64 2. How many times does a loop with the header for count in range(10): execute the statements in its body? b. 10 d. 0 3. In Python, prior to being referenced, a variable must be a imported b. declared c. defined d. None of the above is true. 4. For the following statement:s [x in range(1, 9, 1)] a. s stores a list of integers from 1 to 8 b. s stores a list of integers from 1 to 9 c. stores a list of integers from 0 to 8 d. stores a list of integers from 0 to 9 e. None of the above 5. The input function: x-inputEnter an integer) sets variable x to an integer when user enter an integer. print an integer to the screen a. b. c. sets variable x to a float when user enter a float number. d. sets variable x to a string when user enter an int number 6. for the following commands on the shell: >>>import os >>os.getewd0 Python interpreter a. prints your working directory. b. prints all WORD documents that are stored in the Python directory c. prints all C program files and WORD documents that are stored in the Python directory d. None of the above. 7. Which of the following is how you can run a Python script?, a. Run the script directly at windows command line b. Run the script directly at Python's interactive prompt c. Run the script from Python IDLE run menu

Explanation / Answer

1) D

the ** means power function in python and left so 3^2 is 9 and nex 2^9 is 512

2) B

3)C

4)E, it will store whether x is in range of given values.The values are true or false

5)A

6)D

7)E

8)D

9)A

10)D , we can not assign new values to tuples

11)a