Page 266 - Ai_V1.0_Class9
P. 266
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
264 Artificial Intelligence Play (Ver 1.0)-IX

