Program 1:
To write a Python program to read the name and
marks of a student and display the total marks.
Program:
name = input("Enter student name: ")
m1 = int(input("Enter marks of subject 1: "))
m2 = int(input("Enter marks of subject 2: "))
m3 = int(input("Enter marks of subject 3: "))
total = m1 + m2 + m3
print("Student Name:", name)
print("Total Marks:", total)
Program 2: To write a Python program to input the
lengths of the three sides of a triangle and
determine whether it is an equilateral, isosceles,
or scalene triangle.
Program:
a = int(input("Enter first side: "))
b = int(input("Enter second side: "))
c = int(input("Enter third side: "))
if a == b and b == c:
print("It is an Equilateral Triangle")
elif a == b or b == c or a == c:
print("It is an Isosceles Triangle")
else:
print("It is a Scalene Triangle")
Program 3: To write a Python program to display
even numbers and their squares between 100 and
110.
Program:
for i in range(100, 111):
if i % 2 == 0:
print("Number:", i, "Square:", i * i)
Program 4: To write a Python program to read a
string, split it into a list of words, and display each
word.
Program:
text = input("Enter a string: ")
words = [Link]()
for word in words:
print(word)
Program 5: To write a Python program to check
whether a user is eligible for a driving license or
not.
Program:
age = int(input("Enter your age: "))
if age >= 18:
print("You are eligible for a driving license")
else:
print("You are not eligible for a driving license")