Exercises

Intermediate Python Programming Quiz

Challenge your Python knowledge with this intermediate programming quiz. Explore essential concepts including the len() function, defining functions with def, writing comments, identifying list types, creating empty dictionaries, and following PEP 8 style guidelines. You will also test your understanding of lambda function syntax, exception handling keywords, string concatenation, and using break to exit loops. Whether you are reinforcing foundational skills or preparing for a coding assessment, this quiz offers a quick, practical way to review core Python syntax and programming concepts.

Answer the questions below and check the explanation for each answer.

0/10 answered

  1. 1

    What does the 'len()' function do in Python?

  2. 2

    Which keyword is used to create a function in Python?

  3. 3

    How do you insert COMMENTS in Python code?

  4. 4

    What is the output of 'print(type([]))' in Python?

  5. 5

    How can you define an empty dictionary in Python?

  6. 6

    What is 'PEP 8'?

  7. 7

    Which of the following is the correct syntax for a lambda function?

  8. 8

    Which keyword is used for exception handling in Python?

  9. 9

    Which operator is used to concatenate strings in Python?

  10. 10

    How can you break out of a loop in Python?

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate