30 Questions about Python
English
Elementary
30 beginner level questions about python :)
Description
Tags
30
Questions
15 sec
Per question
2:25
Average time
Disqualified
Contest Score
2.3
Community Rating
13
Participants
Unfortunately, this test will not be able to receive a prize:
Not an original test. Questions, answers, explanations were copied from an existing test. E.g.:
#q5 <= https://www.geeksforgeeks.org/output-python-program-set-15-loops/
#q7 <= https://www.geeksforgeeks.org/output-python-programs-set-21-bool/
#q23 <= https://www.chegg.com/homework-help/questions-and-answers/select-correct-ways-get-value-marks-key-student-1-name-emma-class-9-marks-75-select-one--m-q52171643 etc.
wrong answer
I hv checked that False == False returns True but quiz shows False. Also, only answer shown in explanation.
Incomplete ques are -
What does the above return? (ans : [7, 2, 'gfg']
what does type(collection) return? (ans : List)
What would lis.index(105) return? (ans : 5)
What does the above return? (ans : True) - two times
Correct ans not in option
correct ans for (ques - str1 = 'Welcome'...) is Welco Customer
Also in explanation till is mispelled til
(ques : Items are accessed by their position in a dictionary..) has no proper explanation. Atleast correct statement could hv been shown.
error in question- Two questions lags indentation in code
first is
def func1():
x = 50
...
and second is
x = ['ab', 'cd']
for i in x:
...
Your answer is "range". Yes, type of "range(5)" is range.
But you asked, what is the type of "type(range(5))". Its type is "type".
Code: https://ideone.com/DEChgr
Documentation: https://docs.python.org/3/library/functions.html#type, https://docs.python.org/3/library/stdtypes.html#bltin-type-objects
I don't understand question.
Explanation says that this question is about printing multiple values to output. But "return" and "print" are different things.
In one question you used "print a//b" without parentheses which is correct only in Python 2.
In another you say that type of "range(5)" is range but it is true only for Python 3:
Code for Python 3: https://ideone.com/DEChgr (range)
Code for Python 2: https://ideone.com/36x6yP (list)
Time is to short for some questions (e.g. Q3)
1. https://imgur.com/73w4QhT
2. https://imgur.com/CHm9809
3. https://imgur.com/pJR2LtT
4. https://imgur.com/rcQMLXg
On the other hand this question didn't make sense at all: https://imgur.com/KIyg1TQ