Master Python Basic To Inter in 15 Days Version01
Master Python Basic To Inter in 15 Days Version01
Python
Basic → Intermediate
In Just 15 Days
*Disclaimer*
Everyone learns uniquely.
1
Day 01
2
, Write a Python program to calculate the area of a
rectangle given its length and width
Create a program that takes a user's name and age as
input and prints a greeting message
Write a program to check if a number is even or odd
Given a list of numbers, find the maximum and minimum
values
Create a Python function to check if a given string is a
palindrome
Calculate the compound interest for a given principal
amount, interest rate, and time period
Write a program that converts a given number of days
into years, weeks, and days
Given a list of integers, find the sum of all positive
numbers
Create a program that takes a sentence as input and
counts the number of words in it
,( Implement a program that swaps the values of two
variables.
3
Day 02
4
,% Given a list of numbers, find the sum and average)
% Create a program that takes a temperature in Celsius and
converts it to Kelvin)
% Implement a program that checks if a given string is a
palindrome)
% Create a function to reverse a given string)
% Given a list of names, concatenate them into a single
string separated by spaces)
% Write a Python program to check if a given string is a
pangram (contains all letters of the alphabet))
% Calculate the area and circumference of a circle given its
radius)
% Implement a program that converts a given number of
minutes into hours and minutes)
% Create a function to count the number of vowels in a
given string)
,% Write a program to check if a number is prime.
5
Day 03
6
1& Create a program that takes a year as input and checks if
it is a leap year or not+
& Given a list of integers, find all the even numbers and
store them in a new list+
.& Write a Python program to check if a given number is a
prime number+
#& Create a program that generates the Fibonacci sequence
up to a given number of terms+
-& Given a list of names, print all names starting with the
letter 'A'+
& Implement a program that prints the multiplication table
of a given number+
& Write a program that calculates the factorial of a given
number+
& Create a loop that prints all prime numbers between 1 and
50+
& Given a list of words, count the number of words with
more than five characters+
1 & Calculate the sum of digits of a given number.
7
Day 04
8
/& Given a list of numbers, create a function to find the sum
of all positive numbers*
& Write a Python function to check if a given string is a
palindrome*
& Implement a function that returns the factorial of a given
number using recursion*
& Create a function to find the square of each element in a
given list*
& Write a function to check if a number is even or odd and
return "Even" or "Odd" accordingly*
& Calculate the area of a triangle given its base and height
using a function*
& Create a function that takes a list of strings and returns
the list sorted alphabetically*
& Write a function that takes two lists and returns their
intersection (common elements)*
& Implement a function to check if a given year is a leap
year or not*
/ & Create a function that takes a number as input and prints
its multiplication table.
9
Day 05
10
+# Given a list of words, concatenate them into a single
string separated by spaces'
# Create a function to reverse a given string'
# Write a program that takes a sentence as input and
counts the number of words in it'
# Implement a function that checks if a given string is a
pangram (contains all letters of the alphabet)'
# Given a string, write a function to remove all vowels from
it and return the modified string'
# Write a Python program to find the length of the longest
word in a sentence'
# Create a function that takes a sentence as input and
returns the sentence in reverse order'
# Given a list of names, count the number of names that
start with a vowel'
# Write a function to remove all duplicate characters from a
given string'
+# Implement a program that takes a sentence and a word as
input and checks if the word is present in the sentence.
11
Day 06
12
-% Given two lists of numbers, concatenate them into a
single list)
elements in a list)
ascending order)
-% Implement a function that takes two lists and returns their
13
Day 07
14
,' Given two dictionaries, merge them into a single
dictionary#
' Write a program that finds the most frequent element in a
list#
' Implement a function that removes a key-value pair from
a dictionary#
' Create a program that checks if two sets have any
elements in common#
' Given a list of dictionaries, find the dictionary with the
highest value for a specific key#
' Write a Python program that counts the number of
occurrences of each character in a given string using a
dictionary#
' Given two sets, find the union, intersection, and
difference between them#
' Create a function that takes a list of dictionaries and sorts
them based on a specified key#
' Write a program that finds the average value of all the
elements in a list of dictionaries#
,' Implement a function that takes a list of strings and
returns a set of unique characters present in all strings.
15
Why
Bosscoder?
750+ Alumni placed at Top
Product-based companies.
Explore More
16
Day 08
Q 2: Create a new text file and write some content into it.
17
3* Write a Python program to copy the contents of one text
file into another-
* Given a CSV file with student names and scores, find the
student with the highest score-
* Implement a program that reads a text file and counts the
number of words and lines in it-
* Create a function that takes a list of sentences and writes
them to a new text file, each on a new line-
* Given a CSV file with employee details (name, age,
salary), calculate the average salary of all employees-
* Write a program that reads a CSV file and finds the total
sales revenue for a specific product-
)* Given a text file with a list of numbers, write a function
that finds the sum of all numbers in the file-
* Implement a program that reads a CSV file and generates
a bar chart to represent the data using Matplotlib-
* Write a function that reads a JSON file and extracts
specific information from it-
3 * Given a CSV file with temperature data for each day of
the week, find the average temperature for each day.
18
Day 09
19
3- Create a class to represent a Student with attributes like
name, age, and grades1
- Given a CSV file with employee details (name, position,
salary), create a class to represent an Employee1
8- Implement a program that simulates a basic bank account
using a BankAccount class1
- Write a Python program that uses a Rectangle class to
calculate the area and perimeter of a rectangle1
7- Create a class to represent a Car with attributes like
make, model, and year1
- Given a JSON file with customer data, create a Customer
class to store and manipulate the data1
- Write a program that uses a Person class to keep track of
a person's name, age, and address1
- Implement a program that uses a Circle class to calculate
the area and circumference of multiple circles1
- Given a CSV file with product details (name, price,
quantity), create a Product class to manage the data1
3- Create a class to represent a Movie with attributes like
title, director, and rating.
20
Day 10
22
! Create a class hierarchy to represent different types of
electronics (Phone, Laptop) with their attributes$
! Given a CSV file with employee details (name, position,
salary), create an Employee class with private attributes$
! Implement a program that uses inheritance to represent a
hierarchy of shapes (Circle, Triangle, Rectangle, etc.).
23
Day 11
24
2+ Given a list of numbers, create a NumPy array and find
the sum and product of its elements/
+ Implement a program that generates a NumPy array with
numbers from 0 to 9 and reshapes it into a 3x3 matrix/
+ Write a Python program that uses NumPy to find the
mean, median, and standard deviation of a dataset/
+ Create a function that takes a list of numbers and returns
the NumPy array sorted in ascending order/
+ Given a list of lists, create a 2D NumPy array and find the
sum of elements in each row and column/
$+ Implement a program that generates a random NumPy
array and finds the maximum and minimum values/
+ Write a function that takes a NumPy array and returns a
new array with all elements squared/
+ Given a NumPy array, calculate the dot product of the
array with itself/
+ Create a program that uses NumPy to calculate the
inverse of a 2x2 matrix/
2 + Implement a function that takes a NumPy array and
returns the transpose of the array.
25
Day 12
26
/( Given a CSV file with student details, read it into a Pandas
DataFrame and find the average age of students&
( Implement a program that generates a Pandas Series with
dates and filter it to get dates in a specific range&
+( Write a Python program that uses Pandas to read a CSV
file and find the maximum and minimum values in each
column&
#( Create a function that takes a Pandas DataFrame and
returns a new DataFrame with rows sorted in ascending
order&
*( Given a Pandas DataFrame, filter the rows to include only
the rows where a specific column meets a condition&
( Implement a program that reads a CSV file into a Pandas
DataFrame and calculates the sum of a specific column&
( Write a function that takes a Pandas DataFrame and adds a
new calculated column to the DataFrame&
( Given a Pandas DataFrame, group the data by a specific
column and calculate the mean of another column&
( Create a program that reads a JSON file into a Pandas
DataFrame and extracts specific information from it&
/ ( Implement a function that takes a Pandas DataFrame and
returns the transpose of the DataFrame.
27
Day 13
28
1' Given a Pandas DataFrame, create a line plot to visualize
the trend of a specific column over time+
' Implement a program that generates a histogram using
Matplotlib to visualize the distribution of data+
' Write a Python program that uses Seaborn to create a
scatter plot matrix for multiple variables in a DataFrame+
' Create a function that takes a Pandas DataFrame and
generates a box plot to visualize the distribution of data+
' Given a CSV file with sales data, use Matplotlib to create
a bar plot to compare the sales of different products+
!' Implement a program that reads a JSON file into a Pandas
DataFrame and uses Seaborn to create a violin plot+
' Write a function that takes a Pandas DataFrame and
generates a pair plot to visualize the relationships
between variables.
29
Given a Pandas DataFrame, create a pie chart using
Matplotlib to visualize the distribution of data in a specific
column
Create a program that reads a CSV file into a Pandas
DataFrame and uses Seaborn to create a swarm plot for
data visualization
' Implement a function that takes a Pandas DataFrame and
generates a heatmap using Seaborn to visualize the
correlation between variables.
30
Day 14
31
4' Given a Pandas DataFrame, remove duplicate rows and
reset the index of the DataFrame+
' Implement a program that reads a CSV file into a Pandas
DataFrame and handles missing values using Imputation+
' Create a function that takes a Pandas DataFrame and
converts text data into numerical values using One-Hot
Encoding+
' Given a Pandas DataFrame, normalize the numerical
features using Z-Score Normalization+
' Write a Python program that uses Scikit-Learn to perform
data standardization on a dataset+
0' Implement a program that reads a JSON file into a Pandas
DataFrame and handles outliers using Winsorization+
' Create a function that takes a Pandas DataFrame and
removes irrelevant features using Feature Selection
techniques.
32
"# Given a CSV file with customer details, preprocess the
data for further analysis (e.g., handle missing values, scale
features)'
# Write a Python program that uses Scikit-Learn to perform
data transformation using PCA (Principal Component
Analysis)'
+# Implement a function that takes a Pandas DataFrame and
performs data discretization on a numerical feature.
33
Day 15
34
5- Given a CSV file with data about customers (features) and
their churn status (target), split the data into training and
testing sets*
- Implement a program that uses Scikit-Learn to train a
Decision Tree classifier on a dataset*
0- Write a Python program that uses Scikit-Learn to perform k-
fold cross-validation on a dataset*
%- Create a function that takes a Pandas DataFrame and trains
a Random Forest classifier on the data*
/- Given a CSV file with data about student scores (features)
and their grades (target), split the data into training and
testing sets*
'- Implement a program that uses Scikit-Learn to train a
Support Vector Machine (SVM) classifier on a dataset*
- Write a Python program that uses Scikit-Learn to perform
hyperparameter tuning using Grid Search on a dataset*
- Create a function that takes a Pandas DataFrame and trains
a k-nearest neighbors (KNN) classifier on the data*
- Given a CSV file with data about housing prices (features)
and their labels (target), split the data into training and
testing sets*
5- Implement a program that uses Scikit-Learn to train a Naive
Bayes classifier on a dataset.
35
Why
Bosscoder?
750+ Alumni placed at Top
Product-based companies.
Explore More