Professional Documents
Culture Documents
Ans: Indentation Q2: Q1-39 (Set-I) Q40-92 (set-II) Q1
Ans: Indentation Q2: Q1-39 (Set-I) Q40-92 (set-II) Q1
Q40-92(set-II)
Q1
Ans:
Indentation
Q2
Ans: None
Q3
Ans: Scope
Q4
Ans : 100
Q5
Ans : 100
Q6.
Ans:
None
Q7.
Option C is correct
Q8.
Q9
Ans : def
Q10.
ans : return
Q11.
Ans : local
Q12.
Ans: default
Q13.
def hello(p,r=10,t=20):
print(p+r+t)
hello(r=30,p=50)
a) Error b) 80 c) 100 d) 60
Q14.
def hello(p,r=10,t=20):
print(p+r+t)
hello(q=30,p=50)
a) Error b) 80 c) 100 d) 60
Ans: Error
Q15.
Ans: functions
Q16
Ans: identifier
Q17.
Ans: tuples
Q18
Q19
Q20
Ans: colon
Q21
def study(num=5):
print(num+5)
study()
study(7)
a) Error b) 10 12 c) 10 10 d) 12 12
Ans: 10 12 (option b)
Q23.
Ans:
Q24.
Ans: (14,0)
Q25.
Ans: 100 (option a)
(if function was called before printing than global variable will be overwritten
and answer would be 50)
Q26.
s="WelCoMe"
for x in s:
if x.isupper():
print(x)
print(s2)
for i in range(7):
print(i,end='')
Q29
s="WeLcOme"
for i in range(7):
if i%2==0:
print(s[i],end='')
Qwhat is the output of code
a) WeLc
b) WLcO
c) WLOe(correct)
d) WLoe
Q30.
s="WeLcOme"
for i in range(7):
if i%2==1:
print(s[i],end='')
for i in range(7):
if i%2==1:
print(s[i+1],end='')
else:
print(s[i-1],end='')
StudyTriggerR@2@2
Ans: option a) is correct
Q33
Ans : a
Q34
Ans: random
Q39 to use any module which keyword is used
a) Use
b) Include
c) import (correct)
d) get
(SET-2)