Professional Documents
Culture Documents
e. Rewrite the follwing code after removing syntax error(s) if any, underline the corrections: 2
def callme(a=1,b):
s=(0)
while i in range(a,b):
sum =+ i
return sum
m,n=10,20
c=call(m,n)
g. Observe the following code carefully and write the correct possible outcomes out of (i) to 2
(iv). Justify your answer.
import random
def recur(n):
print(n,end='#')
if n<=3:
return
m=random.randint(0,1)
if m:
recur(n-1)
else:
recur(n-2)
recur(10)
3. b. Define a function to count all the words starting with Vowels in a file V.TXT. Display the 2
count.
e. Define a function SUM(N) which calculates and return the sum of all the digits present in 2
the integer N passed to it. e.g. if N=123 then it returns 6. (1+2+3=6)
5. a. Explain the term degree and cardinality. Also give suitable example. 2
b. Find out the DDL & DML commands from the following: 2
CREATE TABLE, INSERT INTO, DELETE, ALTER TABLE
c. Consider a table Employee(EmpCode, Name, Dept, Aadhar, Desig). Find out the candidate 1
keys and alternate keys.
d. Which command is used to delete a table. 1
e. Write a output for SQL queries (i) to (iii), which are based on the table: STUDENT 5
Table : STUDENT
Page:2