KEMBAR78
String May Worksheet2 | PDF
0% found this document useful (0 votes)
5 views2 pages

String May Worksheet2

Uploaded by

alangiftson2008
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)
5 views2 pages

String May Worksheet2

Uploaded by

alangiftson2008
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
You are on page 1/ 2

N.S.N.

MEMORIAL SENIOR SECONDARY SCHOOL


Thirumurugan Salai, Thirumurugan Nagar, Chitlapakkam, Chennai – 600064

Class: XII
Subject: Computer Science
Worksheet-String Manipulation
1. Write the output for the following snippet :

2. Fill in the blank with the given clue to find the number of occurrences of
any word.
x = input("enter a string")
y = list( )
y=x. ______( ) [ to split in to words]
c=0
z = input("enter a string to search")
for i in _____ : [variable of the list variable]
if z ______ i: [ relation operator to compare
c = c+1 the equality]
print(“no. of occurrences of the searching word is ; “, c)

3. Debug the program to accept a string and display the string and also
display the word which has the vowel ‘a’ in it.
x=input("enter a string "))
y=x.split()
for i in y
for j in i:
if j=='a':
print(i)

4. Write a program to accept your class students' name and display the
length of each name.
5. Consider the table “Employee” given below:

Based on the given table, write SQL queries for the following:
1. Increase the salary by 10% whose salary is less than 3500.
2. Display the Ename, DeptID, Dname and Salary as “Gross Salary” of all
Employee whose location is New Delhi.
3. Delete the record of the employee whose DeptID is 1.
4. Add a new field designation of the size varchar 15.
5. Display the average salary of HR department.
6. Count and display the number of employees in each department.

****************

You might also like