Python programming quiz: trivia test! There are a lot of people who think python is hard to understand, but it is actually the easiest to understand for beginners. Do you think you have enough basic knowledge about the program to answer all the questions in this quiz? Do give it a shot and see if you might need a refresher See moreto understand the programming language much better. All the best!
5
4
2.0
5.0
Rate this question:
1
3
2
6
Rate this question:
A
N
B
Syntax error
Rate this question:
Looks up ‘None’ in the smallest variable if it is a string
The if statement is a syntax error
Matches both type and value
Is true if the smallest variable has a value of -1
Rate this question:
Type()
Convert()
Trans()
Map()
Rate this question:
T[2:2]
T[2:4]
T[2:3]
T[12:3]
Rate this question:
Print(sum([int(num) for num in re.findall('[0-9]+',fh.read())]))
Print(sum([int(num) for num in re.findall('[0-9]+')].fh.read()))
Print(sum([int(num) for num in re.findall('[0-9]+')],fh.read()))
Print(sum(int(num) for num in re.findall('[0-9]+',fh.read())))
Rate this question:
Counts[key] = counts.get(key,0)+1
Counts[key] = (counts[key]*1)+1
Counts[key] = (key in counts)+1
Counts[key] = counts.get(key,-1)+1
Rate this question:
A list of tuples
A list of integers
A list of strings
A tuple with three integers
Rate this question:
It sorts the dictionary based on its key values
It computes the largest of all of the values in the dictionary
It creates the list of tuples where each tuple is a value, key pair
It computes the average of all of the values in the dictionary
Rate this question:
For a temporary variable that you will use and discard without modifying
For a list of items that want to use strings as key values instead of integers
For a list of items you intend to sort in place
For a list of items that will be extended as new items are found
Rate this question:
For i in event.items(): for k in range(len(i)): val = list(i[k].values()) for j in val: print(j)
For i in event.values(): for k in range(len(i)): val = list(i[k].values()) for j in val: print(j)
For i in event.values(): for k in range(len(i)): val = list(i[k].items()) for j in val: print(j)
For i in event.items(): for k in range(len(i)): val = list(i[k].items()) for j in val: print(j)
Rate this question:
While ((line = fl.readLine()) != null) {
Read fl into line
For line in fl:
While (<fl>) {
Rate this question:
File
Let
With
As
Rate this question:
Quiz Review Timeline (Updated): Mar 20, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.