0% found this document useful (0 votes)
3 views1 page

Class 12 CS - Assignment

The document is a Computer Science assignment for Class XII at Jawahar Higher Secondary School, Neyveli. It consists of various tasks including writing Python functions to analyze numbers and strings, as well as predicting outputs for given code snippets. The assignment covers topics such as tuples, string manipulation, file handling, and global variables in Python.

Uploaded by

8925036440h
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Class 12 CS - Assignment

The document is a Computer Science assignment for Class XII at Jawahar Higher Secondary School, Neyveli. It consists of various tasks including writing Python functions to analyze numbers and strings, as well as predicting outputs for given code snippets. The assignment covers topics such as tuples, string manipulation, file handling, and global variables in Python.

Uploaded by

8925036440h
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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)

You might also like