Services
Discover
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Python Programming
Exam 1: Python Programming: Output and Data Types
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
Multiple Choice
What is the output of the following program : I = 0 While i < 3: Print I I += 1 Else: Print 0
Question 22
Multiple Choice
What is the output of the following code : Print 9//2
Question 23
Multiple Choice
What is the output of the following program? D = {1 : 1, 2 : '2', '1' : 1, '2' : 3} D['1'] = 2 Print(D[D[D[str(D[1]) ]]])
Question 24
Multiple Choice
What is the output of the following program? Data = [x for x in range(5) ] Temp = [x for x in range(7) if x in data and x%2==0] Print(temp)
Question 25
Multiple Choice
What is the output of the following program?line = "What will have so will"L = line.split('a') for i in L:print(i, end=' ')
Question 26
Multiple Choice
Predict the output of following python programs Dictionary1 = {'Google' : 1,'Facebook' : 2,'Microsoft' : 3} Dictionary2 = {'GFG' : 1,'Microsoft' : 2,'Youtube' : 3} Dictionary1.update(dictionary2) ; For key, values in dictionary1.items() : Print(key, values)
Question 27
Multiple Choice
What is the output of the following program? Temp = dict() Temp['key1'] = {'key1' : 44, 'key2' : 566} Temp['key2'] = [1, 2, 3, 4] For (key, values) in temp.items() : Print(values, end = "")
Question 28
Multiple Choice
What is the output of the following program? Tday=datetime.date.today() Print(tday.month() )
Question 29
Multiple Choice
What is the output of the following program? Import string Line1 = "And Then There Were None" Line2 = "Famous In Love" Line3 = "Famous Were The Kol And Klaus" Line4 = Line1 + Line2 + Line3 Print(string.find(Line1, 'Were') , string.count((Line4) , 'And') )
Question 30
Multiple Choice
What is the output of the following program : Def myfunc(a) : A = a + 2 A = a * 2 Return a Print myfunc(2)
Question 31
Multiple Choice
What is the output of the following program? F = None For i in range (5) : With open("data.txt", "w") as f: If i > 2:break Print(f.closed)
Question 32
Multiple Choice
Which module in Python supports regular expressions?
Question 33
Multiple Choice
What is the output of the following? Elements = [0, 1, 2] Def incr(x) : Return x+1 Print(list(map(incr, elements) ) )
Question 34
Multiple Choice
Program code making use of a given module is called a ______ of the module.
Question 35
Multiple Choice
What is the output of the following program? Def REVERSE(L) : (L) reverse() Return(L) Def YKNJS(L) : List = list() List.extend(REVERSE(L) ) Print(List) L = [1, 3.1, 5.31, 7.531] YKNJS(L )
Question 36
Multiple Choice
What is the output of the following program : I = 0 While i < 5: Print(i) I += 1 If i == 3: Break Else: Print(0)
Question 37
Multiple Choice
What is the output of the following code? Def foo(fname, val) : Print(fname(val) ) Foo(max, [1, 2, 3]) Foo(min, [1, 2, 3])
Question 38
Multiple Choice
What is the output of the following? Def to_upper(k) : Return k.upper() X = ['ab', 'cd'] Print(list(map(to_upper, x) ) )
Question 39
Multiple Choice
What is the output of the following program? From math import * A = 2.13b = 3.7777 C = -3.12 Print(int(a) , floor(b) , ceil(c) , fabs(c) )
Question 40
Multiple Choice
What is the length of sys.argv?
showing 21 - 40 of 48
Prev
Next
Prev
1
2
3
Next
Related Exams
Previous slide
Next slide
Access For Free