🚀 New batches open: Advanced Excel • Power BI • SQL • AI for Analytics — Book a free demo

Day 12 — Python practice questions with answers

No new syntax. Twelve problems of the kind that come up in interviews and in your first weeks at work — try each before you look.

How to use this page Each box already holds a working answer. Change it to your own attempt first, run it, then press to bring the answer back and compare.

1. Print the numbers 1 to 10 on one line each

2. Total and average of a list

3. Count the even numbers

4. Reverse a string without slicing tricks

5. Find the largest number without max()

6. Count how often each letter appears

7. A function that returns the grade

8. Remove duplicates but keep the order

9. FizzBuzz — the classic interview warm-up

10. Clean a messy list of names

11. Group orders by sales rep

12. A full summary report

Where to go next

You now know enough Python to automate small jobs and pass a first-round screening. The next steps are pandas, NumPy, reading real files and plotting — all on a proper Python setup, which is what the Data Analytics course in Noida covers.

Try these yourself

  1. Rewrite question 5 using max() and check you get the same answer.
  2. Change question 9 to run to 30.
  3. Add a "Pending revenue" line to question 12.
  4. Write a function that takes a list and returns only the unique values, in order.

Ready for pandas and real projects?

This tutorial covers core Python. Our Data Analytics course takes you into pandas, NumPy, real files and visualisation, with mentor support and portfolio projects.

See the course →