Informatics Practices (Part-2)
Informatics Practices (Part-2)
Informatics Practices (Part-2)
DIFFERENCIATED TASK
Give the output of the following when
numl = 4, num2 = 3, num3 = 2
a) numl += num2 + num3
b) print (numl)
c) numl = numl ** (num2 + num3)
d) print (numl)
e) num I num2 + c
f) numl = '5' + '5'
g) print(numl)
i) numi =
j) print(numl)
k) numl = float(10)
l) print (numl)
DATE •
/lllclhplc PAGE'
DATE:
pAGE:
DATE:
PAGE:
33 > Os
9
(3
?5000 5%
tsooo to ?10000
Above uOOOO 10%
00
4 (ÒOoò
is
100
DATE:
PAGE •
4,
1 // ANS: Oslo
2% ANS:
ANS:
4
Assign a value to the salary variab e.
DOD
Assign a value to the bonus variab
5
ANS: SODO
Calculate the total pay by adding salaryand bonus. ssign the
6
result to pay. ANS: b-
7 Display the pay. ANS:
(10000 10%
05000 15%
4.
?20000
Gross salary DA HRA,
Correct the following code:
temperature input ("Temperature:
if temperature 00'
prnt "It is hot outside."
Correct the following code:
oscflnput Input ("A cherry is a: ")
pr.nt ("A. Dessert topping t')
print C'B. Desert topping
if userlnput
print "Correct !"
What two things are wrong in the following code?
input ("Enter a number :
Control Structures
I Understand
Need Fairly Very
Topic / Lesson Objective but need to
Help Through Through
Understand the concept and usage of selection and iteration statements.
2 Appreciate the need and use of Relational and Logical operators
3 Analyze the problem, decide and evaluate conditions
I need to work on :
DATE:
PAGE:
tこ) 。
斗とう
。
当
ゝ( く 。
れh ん乙 ゞなみ'
ゾⅣノ
ノ
く
く
こ
PAGE:
PAGE:
C'Êth) *R-2
b&e2-
DATE:
PAC,r,
he-u
CLASS TEST
if a and b —2and c —3 then a • c evaluate to :
d) 15
State true or false the statement : operator is evaluate right to left and • is left to
Introduction to Python
Topic / Lesson Objective I Understand
Need Fairly
1 Understandwhat are but need to Very
Python Keywords Help Through Through
2 use of identifiers and revise
vanables
3 Understand and use Data
Types
4 appreciate the various
Operators
5 Understand Expressions
6 Understand the input and
Output
7 Examine the if.glse
Statements
8 Examine the for Loop
& while loop
I need to work on :
Lis (s DATE: IT/
PAGE
LISTS
Sl Topic / Lesson Objective
CRstY
DATE: 023/ •
pAGE :
AFL
What will be the output of the following
statements?
i) listl = 101
listl.sort()
print(listl)
listl = 101
sorted(listl)
print(listl)
k) listl
listl =
t) It 2
DATE'
PAGE:
S listl(7üJ
DATE
PAGE:
POST ASSESSMENT
1 What will the following code display?
numbers = Il, 2, 3, 4, 51
my_list = numbers[1:31
print(my_list)
Ans
Ans
(71
CRS
t)ArE.
PAGE •
Mc/%o
In'Jh>5
4
( to ~0
tD 40 1
0
り) い
) は均 (0 ~0
0な
お 【
0 0 0い
2さやの 朝
)ら
う) こ 0 20ー
(の气0 谷0
DATE:
pAGE :
-c
sum=sum+c
c
10
> 90
while
print(a)
2.
for i in '678'/
print( 'CS Class
3.
for i in
print(i**2)
4.
while 1<4:
for j in range(i):
PAGE:
List.append(eiem)
A ppend
ListMtend(list2)
Extend
Insert
List.reverse()
Reverse
List.index(elem)
Index
OPERATIONS
List.sort()
Sort
List.remove(eiem)
Remove
or False.
following statements are True
State whether the
dynamically-typed language. shel
(a) python is a command in Python
repeat the last typed
(b) Att+R is used to
same in Python.
(c) Print and print are method.
sep argument is used with print()
W) The
high-level language.
(e) Python is a compiled
language.
(f) Python is a cross-platform language.
interpreted language, not a compiled
(g) Python is an
free, open-source and portable language.
(h) Python is a
Python.
Python Editor refers to Script mode in
(i) Python.
shortcut key combination is used to exit
(j) Ctri+Q
(MCQs):
ultipie Choice Questions
by
(a) Python was developed
(i) Charles Babbage
(ii) Guido van Rossum
(iii) Tim Berners Lee
(iv) Robert E. Kahn
a vowei•)
e ,, as a eer.se.-;ant")
Write a Python prqram to find those numbers which are divisible by and multiples of 5 between IS
and (both included).
tex x range (iSOC. 2701) :
and :
{x)
Write Python prqram that accepts a word from the user and reverses it.
• I• Input a word to reverse: • )
char in range (len (word) - I, -
end•••)
Wrke a pt'%ram to count ete number of even and odd numbers from a series of numbers starting
$ 90.
odd O
zanøe(S.10i) :
even+—i
else:
print of even numbezs :• , count even)
of odd nu&ers :% count odd)
WAP goe user and print the table of that number.
*Pyt.boa to Print Multiplication Table of a Number
inc the number; )
table of % rnn)
num • I)
-WAPto print series up to certain Emit.
'Program to print Fibonacc4 ser See
a—int (input ( •enter Cbe terns") )
•first eleent of series
•second eleent of series
print (f, g, end— e 9)
s—next
DATE:
REINFORCEMENT OF PYTHON BASICS
for i in range(1,10,2):
C+=2
print(c)
c.i6 d.10
11.What is the correct expansion of IDLE?
. Integrated Development Learning Environment
b. Interact Development Learning Environment
c. Internet Development Learning Environment
d. Integrated Direct Learning Environment
12.Find the output of the following code:
b=b+2
c-=b
print(a,b,c)
a. 12 22 27 b. 12 22 8 c. 10 20 30 d.30 20 10
13.Which of the following option is incorrect?
score.
a. The first character must be a letter or under
except underscore.
b. An identifier cannot contain any special character
Inct.
c. Upper and lower-case letters are treat as cf
x_/An identifier must be a keyword.
14.The can be used to get the memory address of a variable.
b. id() c. int() d. str()
a. type()
python code:
15. What will be the output of the following