Python Quiz 2

Welcome to your Python Quiz n°1 !

1. 

How to convert the variable "stringInt" to integer ?

2. 

Let's consider that we have a variable a="one word". What is the function that retrieves the type of the variable?

3. 

In Python, what is one function to output content to the console?

4. 

What syntax allows to replace the sub-string "abc" by "dfe" in the string variable "myword" ?

5. 

Which of the following is a valid list in Python?

6. 

How to convert the variable intString to a string ?

7. 

Which one of the following is a valid Python if statement ?

8. 

How do you create a variable “number” that is equal to 5?

9. 

What syntax is correct for declaring a function?

10. 

What symbol can you use to comment out one line of code?

By ayed_amira

I'm a data scientist. Passionate about new technologies and programming I created this website mainly for people who want to learn more about data science and programming :)

Leave a comment

Your email address will not be published.