[go: up one dir, main page]

0% found this document useful (0 votes)
20 views6 pages

GR-11-CS - Sa-2024

Uploaded by

ashwinajay14
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)
20 views6 pages

GR-11-CS - Sa-2024

Uploaded by

ashwinajay14
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/ 6

Summer Assignments 2024-25

GRADE: 11

SUBJECT : COMPUTER SCIENCE


1) Completion of journal
2) To Prepare Presentation
Unit 3
• Society, Law and Ethics
• Digital Footprints
• Digital Society and Netizen: net etiquettes, communication etiquettes, social
media étiquettes
• Data Protection: Intellectual property rights (copyright, patent , trademark),
violation of IPR(plagiarism, copyright infringement, trademark infringement),
open source software and licensing (Creative Commons, GPL and Apache)

3) Worksheet : Write the answers in A4 sheet and submit your work on time.

1) Predict the output


a) print (“Welcome to the world of PYTHON”)
b) >>>8/2
c) >>>5/2.0
d)
i=1
while i<=10:
if i==5:
break
print (i, end=” “)
i=i+1

e) for i in range(10,51,10):
j=i/2
print (j,”@”,end= “ “)
f)
num=5

for i in range(1,11):

print (num,"*", i ,"=",num * i)

g)
for i in range(1,5):

print( " ")

for j in range(1,i+1):

print( “*”)

print()
h)
>>> num=5

>>> sum=10

(a) >>> num and sum


(b) >>>num or sum
(c) >>>num / sum
(d) >>>num%sum
(e) >>>math.sqrt(num*5)
(f) >>>num**2
2)
(a) Rewrite the following code after removing the errors

for i in range[1,10]:

print "i"

(b)Predict the output

for i in range(10,0,-1):

print (i)

(c).Write the above code using while loop.

(d).Rewrite the following code after removing the errors

c=input(Enter the number):

d=c%2
print (“d”)

print (“divisible)

3 Do as directed :

1. Which of the following is the valid variable name:


i) global
ii) 99flag
iii) sum
iv) an$wer
2. Which operations result in 8?
i) 65 // 8
ii) 17 % 9
iii) 2 * * 4
iv) 64 * * 0.5
4 Write the script to display the following patterns for the limit n.
# 1 * ***************
@@ 121 ** * *
### 12321 * * * *
@@@@ 121 * * * *
##### 1 * * ***************
**
*
1 A * 1
11 ABA ** 121
121 ABCBA * * 12321
1331 ABCDCBA * * 1234321
14641 ABCBA ****** 12321
ABA 121
A 1
4 P EDCBA A
434 PY DCBA CCC
43234 PYT CBA EEEEE
4321234 PYTH BA GGGGGGG
43234 PYTHO A
434 PYTHON
4
5 Find output

a) x,y=10,0
while x>y:
print(x,y)
x-=1
y+=1
b) for q in [100,50,-10]:
print(q)
c) for x in [10,20,30,40]:
x+=2
print(x)
d) c=0
for x in range(10):
for y in range(5):
c+=1
print(c)
e) k=True
x=100
while k:
print(x,k)
x-=10
if x<50:
k=False
f) for i in range(4):
for j in range(5):
if i+1 ==j or j+i ==4:
print(“+”, end=” “)
else:
print(“o”,end=” “)
print()
g) s=0
for i in range(5):
for j in range(5,0,-2):
if i== 2:
break
elif i==3:
continue
else:
s+=j
print ("i=",i,"s=", s) # outside j loop

h) for i in range(5):
if i<3:
print ("very low")
elif i<4:
print ("high")
else:
print ("very high")
else:
print(" EVALUATION OVER")
i) for i in range(0,10):
pass
print(i)
j) for k in range(10,1):
print(“hello”)
print(“ how are you”)
k) n=10
ans=1
while(n>0):
ans= ans+n**2
n+=1
print(ans)
l) consider the following code fragments and predict the output if input is 1) “Jacob” 2)
“12345” 3) “END” 4) “end”
name=””
while True:
name= input(“ enter name”)
if name==”end”:
break
print(“hi”)
print(“hello”,name)
else:
print(“ I am out of loop”)

name=””
while True:
name= input(“ enter name”)
if name==”end”:
pass
print(“hi”)
print(“hello”,name)
else:
print(“ I am out of loop”)
---------

You might also like