Exam Questions and CORRECT Answers
What is the function of the secondary storage in a computer?
A. Retrieve web pages over the Internet
B. Execute all of the computation and logic of the program
C. Take input from the user
D. Store information for the long-term, even beyond a power cycle. - CORRECT
ANSWER - D. Store information for the long-term, even beyond a power cycle
Which of the following are advantages of using Jupyter notebook?
A. Store data
B. Code development
C. Documentation
D. Communicate and share results - CORRECT ANSWER - B. Code development
C. Documentation
D. Communicate and share results
Which of the following is correct about Python?
A. High-level language
B. It is a machine language
C. It is a low-level language
D. An assembly language - CORRECT ANSWER - A. High-level language
The following code will cause an error
Print("Hello world!") - CORRECT ANSWER - True
Where in the computer is a variable such as "x" stored after the following Python line finishes?
,A. Hard disk
B. Input Devices
C. Central Processing unit
D. Main Memory
E. Output Devices - CORRECT ANSWER - D. Main Memory
What will x be after the code is executed
x = 43
x = x + 1 - CORRECT ANSWER - 44
When would you use a markdown cell?
A. Add a title to Jupyter notebook
B. Calculate the values of 12 x 25
C. Add headings to sections of a Jupyter notebook
D. Print out text as "Hello World!" - CORRECT ANSWER - A. Add a title to Jupyter
notebook
C. Add headings to sections of a Jupyter notebook
Which of the following can execute code cells in Jupyter notebook?
A. Ctrl+R
B. From the menu Cell-Run Cells
C. Ctrl+Enter(in windows) and Command+Enter(in Mac)
D. Shift+Enter - CORRECT ANSWER - B. From the menu Cell-Run Cells
C. Ctrl+Enter(in windows) and Command+Enter(in Mac)
D. Shift+Enter
To be executed, which of the following does Python programming language use?
A. Calculator
, B. Interpreter
C. Compiler
D. Translater - CORRECT ANSWER - B. Interpreter
If you accidentally deleted (cut) a cell and want to get it back, what can you do?
In the ____ mode, use the keyboard shortcut __. - CORRECT ANSWER - command, z
An operator, denoted with a % that works on integers and yields the remainder when one number
is divided by another
A. modulus operator
B. Statement
C. Floating point
D. Assignment - CORRECT ANSWER - A. Modulus operator
A section of code that represents a command or action. So far, the ___ we have seen are
assignments and print expression ______.
A. modulus operator
B. Statement
C. Floating point
D. Assignment - CORRECT ANSWER - B. Statement
A type that represents numbers with fractional parts
A. modulus operator
B. Statement
C. Floating point
D. Assignment - CORRECT ANSWER - C. Floating point
A statement that assigns a value to a variable