Font size
WorksheetsPython Intermediate Quiz - 1
Total questions: 13
Worksheet time: 2mins
Choose the correct answer:
Arbitrary Keyword Arguments
*a
**a
***a
Arbitrary_kwargs
*kwargs
Choose the odd one out
str
int
float
dict
def
Which mode is used for only READING?
"r"
"a"
"w"
"read"
Choose the correct line of code
With open(file_path, file_mode) as file:
with Open(file_path, file_mode) as file:
with open(file_path, file_mode) as file:
with open(file_path, file_mode):
with os.open(file_path, file_mode) as file:
How to get both the KEYS and VALUES of a dictionary
dict.keys_&_values()
dict.items()
dict.all()
dict.stuff()
Keyword used to make a function
(Be careful with the case of the letters)
(a)
.listdir() is a function of the module 'x'
what is the name of the module 'x'?
sys
win32
OS
os
operating_system
x = ' Hello WolR!2D '
which function returns the value as "hello wolr!2d"?
x.strip()
x.lower()
x.LOWER()
x.normalize()
x.strip().lower()
the first keyword in the structure which is used to HANDLE ERRORS
(a)
How to add new things to a dictionary
dict[x] = y
dict.append(x,y)
dict[x] is y
dict.key(x)
dict.value(y)
how to represent this in python:
xy
x*y
x^y
x**y
x exponent y
NameError
invalid functions
a variable which doesn't exist
incorrect spaces
invalid syntax
You will be making a python program.
You will receive the task in your chatbox
Yes I can do it!
No, I can't do it!
