You are on page 1of 4

A. Y.

DADABHAI TECHNICAL INSTITUTE, KOSAMBA


COURSE CODE: Scripting Language - Python (4330701)
Progressive Assessment Sheet as per Rubrics
Name of Student: Semester: 3rd
Enrollment Number: Batch:
Subject Name & Code: Scripting Lang - Python (4330701) Term: Odd 2023-24
Approx.
PR
TOPIC Date Sign CO's Hrs.
NO.
Required
UNIT -1 : Fundamentals of Python
Install and configure the Python environment. Run basic
1 CO1 2
Python commands to verify the Python environment.
Write a program to read your name, contact number, email,
2 CO1 2
and birthdate and print those details on the screen.
Write a program to convert temperature from Celsius to
3.1 Fahrenheit. Equation to convert Celsius to Fahrenheit: F = CO1 1
(9/5) * C + 32
Write a program to compute the slope of a line between two
3.2 CO1 1
points (x1, y1) and (x2, y2). Slope = (y2 - y1)/(x2 - x1)
Write a program to calculate simple interest. Simple Interest =
3.3 CO1 2
(P * R * T)/100
Write a program to calculate area and volume of Sphere.
3.4 CO1 2
Area of Sphere = 4πr^2 Volume of Sphere = (4/3)πr^3
write a program to perform arithmatic operation using
3.5 CO1 2
variable and operators

UNIT - 2: Control Flow Statements


A year is a Leap year if it is divisible by 4, unless it is a
century year that is not divisible by 400 (1800 and 1900 are
4.1 not leap years, 1600 and 2000 are leap years). Write a CO2 1
program that calculates whether a given year is a leap year or
not.
Many companies pay time-and-a-half for any hours worked
above 40 hours in a given week. Write a program to input the
4.2 CO2 1
number of hours worked and hourly rate and calculate the
total wages for the week.
The Body Mass Index (BMI) is calculated as a person's
weight (in kg), divided by the square of the person's height (in
meters). If the BMI is between 19 and 25, the person is
healthy. If the BMI is below 19, then the person is
4.3 underweight. If the BMI is above 25, then the person is CO2 1
overweight. Write a program to get a person's weight (in kgs)
and height (in cms) and display a message whether the person
is healthy, underweight or overweight. BMI = (Weight in
kg)/(Height in m)^2
Write a program to read the marks and assign a grade to a
4.4 student. Grading system: A (>=90), B (80-89), C (70-79), D CO2 1
(60-69), E (50-59), F (
Write a program to read n numbers from users and calculate
5.1 CO2 1
the average of those n numbers (using loop concept).
Write programs to print below patterns:
(i) *
**
***
** **
*****
5.2 CO2 2
Write programs to print below patterns:
(i) 1
12
123
1234
12345
Write a program to sum the following series:
5.3 (1/3)+(3/5)+(5/7)+(7/9)+(9/11)+(11/13)+….........+(95/97)+(9 CO2 1
7/99)
A positive integer is called a perfect number if it is equal to
the sum of all of its positive divisors, excluding itself. For
example, 6 is the first perfect number, because 6 = 3 + 2 + 1,
5.4 CO2 2
the next is 28 = 14 + 7 + 4 + 2 + 1. There are four perfect
numbers that are less than 10,000. Write a program to find
these four numbers.

UNIT - 3: Lists, Tuples, Sets and Dictionaries

Write a program to perform the below operations on the list:


1. Create a list
2. Add/Remove an item to/from a list
6.1 3. Get the number of elements in the list 4. CO3 2
Access elements of the list using index 5. Sort
the list 6. Reverse the
list

Write a program to read n numbers from a user and print:


1. Number of Positive numbers 2.
Number of Negative numbers 3.
6.2 Number of Zeros 4. Number CO3 2
of Odd numbers 5. Number of
Even numbers 6. Average of all
numbers

6.3 Write a program to eliminate duplicate values in the list. CO3 1

Write a program to perform below operations on tuple:


· Create a tuple with different data types.
· Print tuple items.
7.1 · Convert tuple into a list. CO3
· Remove data items from a list.
· Convert list into a tuple.
· Print tuple items. 2
Write a program to perform below operations on set:
· Create two different sets with the data.
· Print set items.
7.2 · Add/remove items in/from a set. CO3
· Perform operations on sets: union, intersection,
difference, symmetric difference, check subset of another
set.
Write a program to perform below operations on
dictionary:
· Create a dictionary.
· Print dictionary items.
7.3
· Add/remove key-value pair in/from a dictionary.
CO3 1
· Check whether a key exists in a dictionary.
· Iterate through a dictionary.
· Concatenate multiple dictionaries.

Write a program that is given a dictionary containing the


average daily temperature for each day of the week, and
7.4
prints all the days on which the average temperature was
CO3 1
between 40 and 50 degrees.
Write a program to repeatedly prompt the user to enter
the capital of a state. Upon receiving the user’s input, the
7.5 program reports whether the answer is correct. Assume CO3 1
thestates and their capitals are stored in dictionaries as
key-value pairs.

UNIT - 4: Functions and Modules


Write a program that defines a function (shuffle) to
8.1 scramble a list into a random order, like shuffling a deck CO4
of cards. 1
Write a program that defines a function to return a new
8.2 CO4
list by eliminating the duplicate values in the list. 1
Write a program to print Fibonacci sequence up to n
numbers using recursion. Fibonacci sequence is defined
as below:
8.3 CO4

1
Write a program that defines a function to determine
whether input number n is prime or not. A positive
whole number n > 2 is prime, if no number between 2
8.4 CO4
and √ (inclusive) evenly divides n. If n is not prime, the
program should quit as soon as it finds a value that
evenly divides n. 1
Write a program that defines a function to find the GCD
of two numbers using the algorithm below. The greatest
common divisor (GCD) of two values can be computed
8.5 using Euclid's algorithm. Starting with the values m and CO4
n, we repeatedly apply the formula: n, m = m, n%m until
m is 0. At that point, n is the GCD of the original m and n
(Use Recursion). 1
Write a program that lets the user enter the loan amount,
number of years, and interest rate, and defines a function
8.6 CO4
to calculate monthly EMI, total payment and display the
amortization schedule for the loan.
1
Write a program that defines functions (mean and
deviation), that computes mean and standard deviation
of given numbers. The formula for the mean and
9.1 standard deviation of n numbers is given as: CO4 1
Write a program that plays the popular scissor-rock-
paper game. (A scissor can cut a paper, a rock can knock
a scissor, and a paper can wrap a rock.) The program
randomly generates a number 0, 1, or 2 representing
9.2
scissor, rock, and paper. The program prompts the user
CO4 2
to enter a number 0, 1, or 2 and displays a message
indicating whether the user or the computer wins, loses,
or draws.
Write a program to create a list representing the results
of 100 students in a test, where each element represents
9.3
a student's marks (between 0 to 10), and display a
CO4 1
histogram for the result.
Create a user defined module with simple functions for:
addition, subtraction, multiplication, division, modulo,
9.4
square, factorial. Write a program to import the module
CO4 2
and access functions defined in the module.

UNIT - 5: String Processing and File Handling


Write a program to check whether a given string is
10.1
palindrome or not.
CO5 1

Write a program to read a string containing letters, each


of which may be in either uppercase or lowercase, and
10.2
return a tuple containing the number of vowels and
CO5 2
consonants in the string.
Write a program to read a date in the format
10.3 DD/MM/YYYY and print the same date in MM-DD-YYYY CO5 1
format.
Write a program that checks whether two words are
10.4 anagrams. Two words are anagrams if they contain the CO5 2
same letters. For example, silent and listen are anagrams.
i. Write a program to perform the below operations on
files:
• Create a text file and write a string to it.
• Read an entire text file.
10.5
• Read a text file line by line.
CO5 1

• Write a string to a file.


• Write a list of strings to a file.
• Count the number of lines, words in a file.
Write a program that reads a text file and counts the
10.6 occurrences of each alphabet in the file. The program CO5 1
should prompt the user to enter the filename.
Write a program that reads a text file and displays all the
10.7
numbers found in the file
CO5 1

Write a program that reads a text file and calculates the


10.8
average word length and sentence length in that file
CO5 1

Write a program that reads two strings stored in two


different text files and prints a string containing the
characters of each string interleaved. Remove white
10.9
spaces from both strings before string interleaving. For
CO5 1

example, Two strings “Hello World” and “Sky is the


Limit” should generate output “HSeklyliosWtohrelLdimit”

10.1 Write a program to copy content of one file into onother. CO5 1

You might also like