Python Quiz For beginners

python-quiz

In addition to the tutorials present on the site, I decided to add small quizzes to test your level in programming! 🙂

So without further delay, here is the first python quizz for beginners (I start slowly haha 🙂 )

Tell me your result in comments!

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

Let’s do it!

Welcome to your Python Quiz n°1 !

1. 

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

2. 

Which of the following is a valid list in Python?

3. 

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

4. 

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

5. 

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

6. 

How to convert the variable intString to a string ?

7. 

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

8. 

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

9. 

How to convert the variable "stringInt" to integer ?

10. 

What syntax is correct for declaring a function?

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 :)

1 comment

  1. hi!,I really like your writing so so much! percentage we be in contact extra about your article on AOL?
    I require an expert in this space to solve my problem.
    Maybe that’s you! Looking ahead to look you.

Leave a comment

Your email address will not be published.