Getting Started with Python: Introduction
What is the correct syntax for specifying multi-line strings in Python?
""" This is a multi-line string """
Which of the following are valid string operations in Python?
"Hello" * 3 "Hello" + "World"
What is the output of the following bit of code? Code Editor: 13 // 5
2
Can view results on the same screen as the code
Either version of Python is fine but 3.7 should be preferred
How can you execute shell commands on Jupyter notebook code cells?
Prefix the shell command using ! i.e. !python -version
Consider two Python variables initialized as shown below. Which of the following logical statements below will have a value of True? Code Editor: a = True b = True
a or b a and b
Which of the following are valid data types in Python?
float bool int
If you want to increment the value stored in the num_1 variable by 10 which of the following Python statements are valid?
num_1 = num_1 + 10 num_1 += 10
Which of the following commands are valid to store a numeric value of 2 in a variable named num_x?
num_x = 2 num_x = 6 - 4
Which of the following functions are valid built-in functions in Python?
type() len() print()
Consider this bit of Python code: Code Editor: num_1 = 10 num_2 = 20 num_3 = num_1 num_1 = 100 What is the final value stored in num_3?
10
Which of the following is an open source distribution of the Python and R programming languages that uses the Conda package manager?
Anaconda
Which of the following terms best describes Jupyter notebooks that you can use to write Python code?
Browser-based Interactive Can view results on the same screen as the code