Python Quiz : Level 1

python-quiz

Hello Everyone !

Today I propose a second quiz for people who start in python!

Tell me your result in comments!

Let’s do it!

If you have read my python articles, you will find most of the answers to the question!

Welcome to your Python Quiz n°1 !

1. 
What syntax is correct for declaring a function?
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 one of the following is a valid Python if statement ?
6. 
How do you create a variable “number” that is equal to 5?
7. 
What symbol can you use to comment out one line of code?
8. 
How to convert the variable "stringInt" to integer ?
9. 
Which of the following is a valid list in Python?
10. 
How to convert the variable intString to a string ?

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.