Page 351 - Artificial Intellegence_v2.0_Class_9
P. 351
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) * * * *
* * * * *
* * * * *
* * * * *
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 N is : 49
Python Practical Questions 349

