0% found this document useful (0 votes)
7 views

Recap

The document outlines a series of programming tasks categorized into Basic, Intermediate, and Advanced levels, focusing on Python programming concepts. Tasks include creating lists, dictionaries, and classes, as well as using libraries like NumPy and pandas. Additionally, there are quiz questions designed to test understanding of these concepts.

Uploaded by

ziada00700
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Recap

The document outlines a series of programming tasks categorized into Basic, Intermediate, and Advanced levels, focusing on Python programming concepts. Tasks include creating lists, dictionaries, and classes, as well as using libraries like NumPy and pandas. Additionally, there are quiz questions designed to test understanding of these concepts.

Uploaded by

ziada00700
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Level

1. Create a list of the first 5 even numbers and print it.


2. Write a Python script to add a key to a dictionary.
3. Create a tuple with different data types and print it.
4. Using a for loop, print numbers from 1 to 10.
5. Write a simple if-else condition to check if a number is odd or even.

Intermediate Level
6. Write a function that returns the maximum number from a list.
7. Use a list comprehension to find all numbers divisible by 3 in a list.
8. Create a dictionary comprehension that maps numbers to their
squares.
9. Write a function that checks if a given key already exists in a
dictionary.
10. Implement a class Rectangle with methods to compute area and
perimeter.

Advanced Level
11. Using NumPy, create a 3x3 matrix with values ranging from 0 to 8.
12. Write a pandas script to read a CSV file into a DataFrame and print
its head.
13. Create a NumPy array and append values to it.
14. Write a Python class Circle that uses property decorators for
diameter and area.
15. Use pandas to create a DataFrame from a dictionary and add a new
column.
16. Implement a function that uses variable-length arguments to sum
values.
17. Create a class BankAccount that supports deposit and withdrawal
operations.
18. Using NumPy, compute the dot product of two arrays.
19. Write a function in Python to check if a string is a palindrome.
20. Using pandas, select rows from a DataFrame based on column
values.
Test Your self (Quiz : 40 Minutes + 5 Packaging)
Basic Level
21. Print all odd numbers between 1 to 20 using a loop.
22. Swap the values of two variables.
23. Find the length of a string without using built-in functions.

Intermediate Level

24. Use a while loop to calculate the factorial of a number.


25. Concatenate two dictionaries into one.
26. Filter out all numbers less than 5 in a list using a loop.
27. Create a list of tuples, each containing a number and its square.
28. Write a function that returns the number of upper case letters and
lower case letters in a string.
29. Implement a class Point that represents a point in 2D space and
includes a method to calculate the distance to another point.
30. mplement a class Point that represents a point in 2D space and
includes a method to calculate the distance to another point.

You might also like