JAWAHAR HIGHER SECONDARY SCHOOL-NEYVELI
Class : XII COMPUTER SCIENCE ASSIGNMENT
1. Write a Python function to accept n numbers in tuple and display number of
even and odd numbers.
2. Write a Python function to accept a string and display the entire string in
uppercase.
3. Write a Python function to accept a string and display number of vowels and
consonants in the string.
4. Write a Python function Accept() to accept a string for [Link] and
Display() to display the words that begins with vowel.
5. Write a Python function Display() to display number of words that begins with
vowel from file [Link]
6. Write the output for the following code :
a=500
def calc():
global a
a=200
print( a, end=’ ‘)
calc()
print(a)
7. Predict the output for the following code :
a. p=20
def sum(q,r=2):
global p
p=r+q**2
print(p, end= '#')
a=5
b=7
sum(a,b)
b. def update(x=300):
x+=200
print(“ x is : “, x)
x = 100
update()
print(“ x after function call is : “, x )
c. def Call(M=800, N=200):
M=M+N
N=M-N
print(M,"@",N)
return M
R,S=500,100
R=Call(R,S)
print(R,"#",S)
S=Call(S)
print(R,"@",S)