# Module quiz: Getting started with Python - Module 1

1. **Python is a dynamically typed language. What does this mean?**
    
    * Python supports both functional and object oriented programming.
        
    * <mark>Python does not require a type for a variable declaration. It automatically assigns the data type at run time.</mark>
        
    * 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.
        
2. **How do you create a block in Python?**
    
    * <mark>A block is created using a colon following by a new line and indentation</mark>
        
    * 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
        
3. **When declaring variable in Python, can a variable name contain white space?**
    
    * Yes
        
    * <mark>No</mark>
        
4. **How can a variable be deleted in python?**
    
    * The remove keyword
        
    * A variable cannot be deleted
        
    * The def keyword
        
    * <mark>The del keyword</mark>
        
5. **In Python, how can you convert a number to a string?**
    
    * enumerate()
        
    * float()
        
    * int()
        
    * <mark>str()</mark>
        
6. **An Integer - int in Python can be converted to type Float by using the float function?**
    
    * <mark>True</mark>
        
    * False
        
7. **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.
        
    * <mark>It controls the flow of the loop and stops the current loop from executing any further.</mark>
        
8. **An enumerate function is used to provide the index of the current iteration of a for loop.**
    
    * <mark>True</mark>
        
    * False
        
9. **What will be the output of the code below:**
    
    ```apache
    a = isinstance(str, "aa")
    
    print(a)
    ```
    
    * It will throw an error. 
        
    *  “aa”
        
    * False
        
    * <mark>True</mark>
        
10. **Select all the valid input() formats among the following.**
    
    *Select all that apply*
    
    * <mark>input("")</mark>
        
    * <mark>input()</mark>
        
    * "" = input("My name is: " + name)
        
    * <mark>name = input("What is your name? ")</mark>
        

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731049100038/45c03426-43bd-487e-8161-af80fa0f5883.png align="center")
