Python Fundamentals

🏷️ Basic
🆓 100% Free Certificate 10 Questions 5 minutes 6 Views

This test evaluates your foundational knowledge of Python, covering syntax, variables, loops, and functions. To build your Python skills, explore Python Basics on W3Schools, Python Beginner Guide on Real Python, and watch this beginner-friendly Python Crash Course on YouTube.

1 What is the correct way to write a for loop in Python?
2 Which of these data types is mutable in Python?
3 What does the len() function do?
4 How do you create a list of numbers from 0 to 9?
5 What is the output of: print(3 * 'ab')
6 Which method would you use to remove an item from a list by value?
7 What is the correct way to check if a key exists in a dictionary?
8 How do you create a function with default arguments?
9 What is the output of: print(10 // 3)
10 Which of these is the correct way to open and read a file?