Return to home page

Python Quiz: Module 3

Creating a User Interface


  1. Which of the following is NOT a Python Coding Standard?
  2. Which of the following are IDEs?
  3. Executing a script containing just pseduo code will produce the same results as Python in your IDE.
  4. x = True produces the same result as x == True in your Python script.
  5. The following code will produce an error: name:str
    print(name)
  6. The following code will produce an error: name:str = str()
    print(name)
  7. What will be the output of executing the following code:

    
    name: str = 'John'
    name = name.upper() 
    if (name == 'John'):
        print('John') 
    else:
        print(name)
    

  8. What will be the output of the following code?

    
    my_object_1 = None
    my_object_2 
    if (my_object_1 == my_object_2):
        print("Equal")
    else:
        print("Not equal")
    

  9. What will be the output of the following code?

    
    thing1: str = "abc"
    thing2: str = "wxyz"
    print(thing1 < thing2)
    

  10. Which operators are overloaded for string?

  11. BONUS Given the code below, choose which statements will show all the methods for a string object.

    
    thing1: str = "abc"