Page 435 - Ai_417_V3.0_C9_Flipbook
P. 435
Python Practical Questions
S. No. Program
1. To print personal information like Name, Father's Name, Class, School Name.
Name="Angelina"
FName="Robert"
Sclass=9
Sch_Name="St. Joseph"
print("***PERSONAL INFORMATION***")
print("Student Name : ",Name)
print("Father's Name : ",FName)
print("Class : ",Sclass)
print("School Name : ",Sch_Name)
Output:
***PERSONAL INFORMATION***
Student Name : Angelina
Father's Name : Robert
Class : 9
School Name : St. Joseph
2 To print the following patterns using multiple print commands:
a) * b) * * * *
* * * * *
* * * * *
* * * * *
Output:
a)
print("*")
print("**")
print("***")
print("****")
b)
print("****")
print(" ***")
print(" **")
print(" *")
3 To find square of number 7
N=7
print("Square of ",N, " is : ",N**2)
Output:
Square of 7 is : 49
Python Practical Questions 433

