Python Quiz 1

Welcome to your Python Quiz n°1 !

1. 

How to convert the variable "stringInt" to integer ?

2. 

Which of the following is a valid list in Python?

3. 

How to convert the variable intString to a string ?

4. 

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

5. 

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

6. 

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

7. 

What syntax is correct for declaring a function?

8. 

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

9. 

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

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.