I
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
KAKATIYA INSTITUTE OF TECHNOLOGY & SCIENCE, WARANGAL
(An Autonomous Institute under Kakatiya University, Warangal)
Tutorial1 (T1)
(UNIT – I)
Course Code-Name U18CS506–Python Branch-Sem-Section 5CSE-1
Programming
Tutorial Sheet posted on 20.07.25 Tutorial class scheduled 25.07.2025
Course Web on on 26.07.2025
Topics Covered Previous week only one introduction class was conducted, and features of python.
Max. Marks: 10
Tutor Q.
Answer the following questions. CO CDLL
ial No
[R]
CO 1
1. [Ap]
[R]
T-1
[Ap]
2. CO 1 [Ap]
[Ap]
Complex Numbers:
3. CO 1 [Ap]
[R,U,Ap]
[R]
[U,Ap]
Compute complex number arithmetic operations
(i) Define a variable in Python. [R]
4. Why is choosing meaningful variable names important in real-world CO1 [Ap]
applications like billing systems? [U,Ap]
Write a Python program to calculate the total bill amount in a
5. CO1 [Ap]
supermarket using variables for item cost, quantity, and tax. [R,U,Ap]
i) Write a program using a loop to simulate a bus ticket vending
machine. [Ap]
6. CO1 [Ap]
The user enters the number of tickets to purchase; print ticket
numbers using a loop (e.g., Ticket #1, Ticket #2...). [An]
Extend the above program to print different messages for different
7. speed ranges using if-elif-else. (e.g., 0–30: Safe, 31–60: Normal, >60: CO1 [Ap]
Over-speeding) [An]
In a banking application, a user can attempt logging in up to 3 times.
8. Write a Python program using a loop and break to simulate this. CO1 [Ap]
After 3 failed attempts, display "Account Locked". [Ap,U]
****
Course Faculty:
Dr. Md. Sharfuddin Waseem, Asst.Prof,Dept of CSE