Font size
WorksheetsPython String
Total questions: 6
Worksheet time: 6mins
What character will be printed on the screen after running this Python code:
a
l
L
Nothing is printed
What character will be printed on the screen after running this Python code:
r
u
a
Nothing is printed
What output will this Python code produce?
Kuala Lumpur
11
12
x
What output will this Python code produce?
M
s
Msl
Mly
Consider this statement:
print(r'foo\\bar\nbaz')
Which of the following is the correct REPL output?
foo\bar\nbaz
foo\bar
baz
foo\\bar\nbaz
foo\\barnbaz
Which of the following Python codes produce the following output (you can select multiple answers)?
I haven't eaten all day and I don't feel hungry.
print("I haven't eaten all day and I don't feel hungry")
print('I haven't eaten all day and I don't feel hungry')
print('I haven\'t eaten all day and I don\'t feel hungry')
print('I haven"t eaten all day and I don"t feel hungry')
