0% found this document useful (0 votes)
37 views2 pages

Xi-C.s H.W

CS PROGRAM

Uploaded by

gyan mandir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

Xi-C.s H.W

CS PROGRAM

Uploaded by

gyan mandir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Holiday Homework

Class –XI Computer Science

1) Name any two immutable data objects of Python.


2) Classify each of the following as a valid or invalid variable:
a. i)Length ii)%age iii)2nd innings iv)Half_Yearly
3) Given that A=4, B=5, C=4, what will be the result of the following expressions:
i)A<=C ii)A<=B
4) What are syntax error?
5) What are variables? Give example.
6)Write the pseudo code that will take a number from the user 2 and print if it is
positive,negative or zero.
7)Rewrite the following program using for loop :
sum=0
i=1
while (i<=10):
sum=sum+i
i=i+1
print(“sum=”,sum)
8)Write a Python script to print Fibonacci series.
9)Identify the errors in the following code:
i. L1= [1,2,3,5] ii. L1 = [1,3,5,8]
An = L1.remove(7) An = L1.remove(8)
print(An + 2)
10)Suggest appropriate functions for the following tasks:
(i) To check whether the string contains digits
(ii) To capitalize all the letters of the string
(iii) To remove all white spaces from the beginning of a string.
(iv) To check whether all letters of the string are in capital letters.
11)Write a program, which consider a list and find the average of number entered through
keyboard until enter‘0’, if number is Zero then it will quit. Finally displays list of numbers. 3 n)
t1= (1,)*3
t1[0]=2
print(t1) , What is the output ?
12)Write the steps to arrange the elements using insertion sort. 12,5,14,8,3,54,25,10,27,30
13)What will be the output
t2=(1,2,3)
t3=(6,7)
t4=t3+t2
t5=t2+t3
print(t4)
print(t5)
14)Write a program to find factorial of a given number.
15)Write an appropriate for loop to be repeated 100 times, except the loop is to be terminated if
thevalue of the variable p becomes 50.
16)Write a program to display the pattern
4321 ABCDE
432 ABC
43 AB
4 A
17)Write a program to input a number and test if it is a prime number or not. 3
18)Write program in python to find reverse of a number
19)Write a program to count and display the number of digits and the number of alphabet in a
string
20) What is dictionary? Write a command to create a dictionary and delete an element from
dictionary.
21)What will be the output of following code?
tup1 = (“comp sc”, “info practices”, 2017, 2018)
tup2 = ( 5, 11, 22, 44, 9, 66)
print(“tup1[0]:”, tup1[0])
print(“tup2[1:5]:”, tup2[1:5])
(22) Write the output of following:
list = [‘I’,’N’,’D’,’I’,’A’]
print(list[0:3])
print(list[3:]
print(list[:])
print(list[1:-2])
2.a Expand the following terms:
i)UNICODE ii)ASCII iii)ISCII
b.Convert following
1) (10111001)2=()8 2) (1234)8=()16
e. Draw the logic circuit from the following expression A’B+A’C
f. Answer the following
(i) Add binary numbers 111.01 and 111.01

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy