PYnative

Python Programming

  • Learn Python ▼
    • Python Tutorials
    • Python Basics
    • Python Interview Q&As
  • Exercises ▼
    • Python Exercises
    • C++ Exercises
    • C Programming Exercises
    • Java Exercises
    • C# Exercises
  • Quizzes
  • Online Compilers▼
    • Online Python Code Editor
    • Online C Compiler
    • Online C++ Compiler
    • Online Java Compiler
    • Online C# Compiler
Home » Python » Quizzes » Basic Python Quiz For Beginners

Basic Python Quiz For Beginners

Updated on: September 3, 2025 | 151 Comments

This Quiz is for beginners who are new to Python Programming. This quiz provides Multiple Choice Questions(MCQs) to get familiar with Python. The quiz focuses on testing your basic skills in Python functions, string, operators, functions, set, and lists.

The quiz contains 25 Questions. Solve 15 correct to pass the test.

  • Read Python Basics to solve this quiz.
  • Solve Python MCQ Test
  • Also, Solve Python Basic Exercise for Beginners.
  • 15 Python Quizzes: each focusing on a specific topic

1. What is the output of the following code?

var = "James" * 2  * 3
print(var)
 
 
 

2. What is the output of the following code?

def calculate (num1, num2=4):
  res = num1 * num2
  print(res)

calculate(5, 6)

Hint: functions in Python

 
 
 

3. What is the output of print(bool(0))?

 
 
 
 

4. How do you add an element to the end of a list in Python?

 
 
 
 

5. What is the output of the following code?

str = "pynative"
print (str[1:3])
 
 
 
 

6. What is the output of the following code?

p, q, r = 10, 20 ,30
print(p, q, r)
 
 
 

7. What is the output of the following code?

sampleList = ["Jon", "Kelly", "Jessa"]
sampleList.append(2, "Scott")
print(sampleList)
 
 
 
 

8. Which of the following data types is mutable in Python?

 
 
 
 

9. What is the output of the following code?

my_list = [1, 2, 3, 4]
print(my_list[2])
 
 
 
 

10. What is the purpose of the pass statement in Python?

 
 
 
 

11. What is the output of the following code?

valueOne = 5 ** 2
valueTwo = 5 ** 3

print(valueOne)
print(valueTwo)
 
 
 

12. What is the output of print(type([]))?

 
 
 
 

13. What is the output of the following code?

x = 10
y = 3
print(x % y)
 
 
 
 

14. What is the purpose of the super() function in Python classes?

 
 
 
 

15. How do you get the current working directory in Python?

 
 
 
 

16. What is a “tuple” in Python?

 
 
 
 

17. What is the purpose of self in a Python class method?

 
 
 
 

18. What is the output of the following code?

var1 = 1
var2 = 2
var3 = "3"

print(var1 + var2 + var3)
 
 
 
 

19. What is the purpose of the if __name__ == "__main__": block?

 
 
 
 

20. Which of the following is NOT a valid variable name in Python?

 
 
 
 

21. Which operator has higher precedence in the following list

 
 
 
 

22. What will be the output of print(3 * "Abc")?

 
 
 
 

23. What is the output of the following code?

sampleSet = {"Jodi", "Eric", "Garry"}
sampleSet.add(1, "Vicki")
print(sampleSet)
 
 
 

24. What is the output of print(10 // 3)

 
 
 
 

25. What is the output of the following code?

print("Python" + "Quiz")
 
 
 
 

Loading ... Loading …

Loading

Filed Under: Python, Python Basics, Python Quizzes

Did you find this page helpful? Let others know about it. Sharing helps me continue to create free Python resources.

TweetF  sharein  shareP  Pin

About Vishal

I’m Vishal Hule, the Founder of PYnative.com. As a Python developer, I enjoy assisting students, developers, and learners. Follow me on Twitter.

Related Tutorial Topics:

Python Python Basics Python Quizzes

All Coding Exercises:

C Exercises
C++ Exercises
Python Exercises
Java Exercises
C# Exercises

Python Exercises and Quizzes

Free coding exercises and quizzes cover Python basics, data structure, data analytics, and more.

  • 15+ Topic-specific Exercises and Quizzes
  • Each Exercise contains 25+ questions
  • Each Quiz contains 25 MCQ
Exercises
Quizzes
In: Python Python Basics Python Quizzes
TweetF  sharein  shareP  Pin

  Python Quizzes

  • 15 Python Quizzes
  • Python Online MCQ Test
  • Basic Quiz For Beginners
  • Variables and Data Types Quiz
  • Functions Quiz
  • if else and loops Quiz
  • Numbers Quiz
  • String Quiz
  • List Quiz
  • Set Quiz
  • Dictionary Quiz
  • Tuple Quiz
  • Operators and Expression Quiz
  • Input and Output Quiz
  • Multithreading and Multiprocessing Quiz
  • File Handling Quiz
  • Random Data Generation Quiz

 Explore Python

  • Python Tutorials
  • Python Exercises
  • Python Quizzes
  • Python Interview Q&A
  • Python Programs

All Python Topics

Python Basics Python Exercises Python Quizzes Python Interview Python File Handling Python OOP Python Date and Time Python Random Python Regex Python Pandas Python Databases Python MySQL Python PostgreSQL Python SQLite Python JSON

About PYnative

PYnative.com is for Python lovers. Here, You can get Tutorials, Exercises, and Quizzes to practice and improve your Python skills.

Follow Us

To get New Python Tutorials, Exercises, and Quizzes

  • Twitter
  • Facebook
  • Sitemap

Explore Python

  • Learn Python
  • Python Basics
  • Python Databases
  • Python Exercises
  • Python Quizzes
  • Online Python Code Editor
  • Python Tricks

Coding Exercises

  • C Exercises
  • C++ Exercises
  • Python Exercises
  • Java Exercises
  • C# Exercises

Legal Stuff

  • About Us
  • Contact Us

We use cookies to improve your experience. While using PYnative, you agree to have read and accepted our:

  • Terms Of Use
  • Privacy Policy
  • Cookie Policy

Copyright © 2018–2026 pynative.com