Introduction to Industry 4.0
CIS · Quiz · Fall 25
Paper 2 of 2Section 23 (A)Switch
Section 23 (A)
Paper 2 of 2
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Department of Computing and Information System (CIS)
Class Test-2, Fall 2025
Course Code: CIS121, Course Title: Introduction to Industry 4.0
Time: 30 Minutes
Marks: 15
1. Write the output of the following codes: [2.5 * 2]
a) total = 0
for i in range(5):
if i == 3:
continue
total = total + i
print("Total:", total)
b) numbers = [10, 20, 30, 40, 50]
numbers[3] = 60
numbers.append(70)
numbers.insert(1, 15)
print("Updated list:", numbers)
2. Explain the similarities between list and tuple with example. [4]
3. Write a Python program to determine bus fare based on distance traveled using the following rules: [6]
i. Distance < 5 km -> 10 Taka
ii. Distance 5 to 10 km -> 20 Taka
iii. Distance 11 to 20 km -> 30 Taka
iv. Distance 21 to 50 km -> 50 Taka
v. Distance > 50 km -> 100 Taka
Sample Input: 15
Sample Output: 30 Taka
Note: The distance must be taken from the user using the input() command and the bus fare should be calculated based on the given rules.