Page 50 - ipp11
P. 50
Ans. (a) ALTER TABLE TEACHERS ADD AGE INT;
(b) SELECT * FROM TEACHERS WHERE NAME LIKE '%i%';
(c)
TeacherID Name Subject Salary
2102 Rekha Verma Computer 72000
2105 Anil Singh Computer 75000
(d)
Name Salary
Meenal Roy 60000
Rekha Verma 72000
Nishika Kapoor 67000
Disha Kumar 58000
(e)
TrainingName TrainingDate
Python Workshop 2025–05–10
Math Pedagogy 2025–04–15
Science Fair Prep 2025–03–25
Section E (5 × 2 = 10 Marks)
36. Answer the following questions: [5]
(a) Draw a flowchart to find the square of a number.
(b) Write a Python program to accept a character from the user and display whether it is a vowel or consonant.
(c) Write a Python program to display first n natural numbers in reverse order.
Ans. (a)
START
Read a Number ‘Num’
SQ=Num*Num
PRINT SQ
STOP
(b) ch=input("enter a character")
if (ch=='a' or ch=='A'):
print(ch, "is a vowel")
elif (ch=='e' or ch=='E'):
print(ch, "is a vowel")
elif (ch=='i' or ch=='I'):
print(ch, "is a vowel")
elif (ch=='o' or ch=='O'):
print(ch, "is a vowel")
elif (ch=='u' or ch=='U'):
print(ch, "is a vowel")
else:
print(ch, "is a consonant")
M.20