Python is a dynamically typed language. What does this mean?
Python supports both functional and object oriented programming.
Python does not require a type for a variable declaration. It automatically assigns the data type at run time.
Python requires you to explicitly set the correct data type and value before assigning a variable.
Python requires that you specify the type of variable before it being assigned.
How do you create a block in Python?
A block is created using a colon following by a new line and indentation
A block is created by a new line
A block is created using a semi colon and a new line
A block is created using a semi colon and indentation
When declaring variable in Python, can a variable name contain white space?
Yes
No
How can a variable be deleted in python?
The remove keyword
A variable cannot be deleted
The def keyword
The del keyword
In Python, how can you convert a number to a string?
enumerate()
float()
int()
str()
An Integer - int in Python can be converted to type Float by using the float function?
True
False
What is the purpose of break in a for loop in Python?
To terminate the code
The break keywork is used to debug a for loop.
The break statement will suspend the code until continue is run.
It controls the flow of the loop and stops the current loop from executing any further.
An enumerate function is used to provide the index of the current iteration of a for loop.
True
False
What will be the output of the code below:
a = isinstance(str, "aa") print(a)
It will throw an error.
“aa”
False
True
Select all the valid input() formats among the following.
Select all that apply
input("")
input()
"" = input("My name is: " + name)
name = input("What is your name? ")