0% found this document useful (0 votes)
8 views2 pages

Exercise Sheet 1

Gg din ghj
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)
8 views2 pages

Exercise Sheet 1

Gg din ghj
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

Agnel Charities

Fr. C. Rodrigues Institute of Technology, Vashi


(An Autonomous Institute & Permanently Affiliated to University of Mumbai)
Department of Electrical Engineering

Exercise Sheet 1 (Experiment 2) (15 Marks)

1. Accept two numbers from user, perform basic math operations and print results.
2. Write and execute Python program to calculate volume and surface area of Sphere and
print results.
3. Write and execute Python program to test if a number is divisible by 3 or 5 or both. If yes
print ‘True’ else print ‘False’.
4. Accepts inputs from user as base and height of right angled triangle and return length of
hypotenuse. (Pythagoras Theorem)
5. Define a multiline string and use membership operator to check if a word belongs to the
string or not. (Return True or False)

Exercise Sheet 2 (Experiment 3) (15 Marks)

1. Write and execute Python program to find LCM of 3 numbers (integers) entered by user.
2. Write and execute Python program to convert angle from degrees to radians and print
results.
3. Write and execute Python program for weight conversion. Take weight in Kg and display
in grams, pounds.
4. Accept 2 integers (n, k) from user and return permutation (nPk) and combination (nCk)
values.
5. Write and execute a Python program to calculate power and resistance if voltage and
current values are given.
Agnel Charities
Fr. C. Rodrigues Institute of Technology, Vashi
(An Autonomous Institute & Permanently Affiliated to University of Mumbai)
Department of Electrical Engineering

Exercise Sheet 3 (Experiment 4) (15 Marks)


1. Use infinite while loop and try-except to take numeric input from user. Run exception if
it is non-numeric input.
2. Write and execute a program to perform following operations on string.
a. String slicing (positive negative both)
b. Convert to uppercase
c. Convert to lowercase
d. Reverse
3. Write and execute a program of while loop with break-continue. Choose a range of 0-9
and break the while loop at value 6.
4. Use for loop to accept 5 numbers from user and print their sum and average.
5. Take marks of particular subject in float form from user and display the grade obtained.
Assume marks out of 100.
𝑚𝑎𝑟𝑘𝑠 ≥ 80 𝑂 𝐺𝑟𝑎𝑑𝑒
70 ≤ 𝑚𝑎𝑟𝑘𝑠 < 80 𝐴 𝐺𝑟𝑎𝑑𝑒
65 ≤ 𝑚𝑎𝑟𝑘𝑠 < 70 𝐵 𝐺𝑟𝑎𝑑𝑒
60 ≤ 𝑚𝑎𝑟𝑘𝑠 < 65 𝐶 𝐺𝑟𝑎𝑑𝑒
50 ≤ 𝑚𝑎𝑟𝑘𝑠 < 60 𝐷 𝐺𝑟𝑎𝑑𝑒
40 ≤ 𝑚𝑎𝑟𝑘𝑠 < 50 𝐸 𝐺𝑟𝑎𝑑𝑒
𝑚𝑎𝑟𝑘𝑠 < 40 𝐹 𝐺𝑟𝑎𝑑𝑒

Exercise Sheet 4 (Experiment 5) (15 Marks)


1. Consider the list num = [2,3,4,2,6,8,12,34,14,8,9,7]. Write and execute Python program
to count only even numbers from this list.
2. Perform following operations on a list:
a. Append
b. Delete
c. Clear
d. Extend
3. Write and execute a program to add items into, remove items from a tuple and join two
tuples.
4. Define set/s and perform intersection, union, addition of items, removal of items.
5. Define a dictionary in Python and access keys, values, delete a key, change value of a
key.

You might also like