Questions Python Fundamentals
Questions Python Fundamentals
Questions Python Fundamentals
dict_exam={"Exam":"AISSCE", "Year":2023}
dict_result={"Total":500, "Pass_Marks":165}
Which statement will merge the contents of both dictionaries?
c) dict_exam.add(dict_result) d) dict_exam.merge(dict_result)
Ques 4) Consider the given expression: not True and False or True
Which of the following will be correct output if the given expression is evaluated?
Ques 7) What will the following expression be evaluated to in Python? print(15.0 / 4 + (8 + 3.0))
Ques 8)
Ques 57)
Ques) What will be the output of the following
a) print(‘xydsdssdaxy’,count(‘xy’))
b) print(‘xydsdssdaxy’,count(‘xy’,2))
Ques) What will be the output of the following
A= {}
A[2] = 1
A[1] = [2,3,4]
Print(A[1][1])
Ques) What will be the output of the following
for i in range(3) :
pass
print(i , end = ‘’)
Ques) What will be the output of the following
for i in range(3) :
break
print(i , end = ‘’)
Ques) What will be the output of the following
A= [1,2,3,4,5]
A.remove(4)
print(A)
Ques) What will be the output of the following
A= [1,2,3,4,5]
A.remove(A.index(3))
print(A)
Ques)
Book = {1: ‘Thriller’, 2: ‘Mystery’, 3: ‘Crime’, 4: ‘’Childern Stories}
Library = {‘5’:’Madras Diaries’, ‘6’: ‘Malgudi Days’}
Answer the following questions
a) Ramesh needs to change the title of dictionary book from ‘Crime’ to ‘Crime Thriller’
b) Write a code to merge the dictionary Book with library dictionary
c) What will be the output of following line of code
print(list(Library))
d)