MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Computer Science
Python
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Q.1
What will be the output of the following python code
1 2 3
123
Error
None of the mentioned
Q.2
If you want to create an empty list called colours in Python, which of the following is correct?
colours = [ ]
colours = ( )
colours = { }
colours = <>
Q.3
What is the value of the expression/ 25?
4
4.0
"4.0"
'4.0'
Q.4
To insert an the string "strawberries" in the first position of a list we use
fruit.append("strawberries, 1")
fruit.insert("strawberries",0)
fruit.insert(1, "strawberries")
fruit.insert(0, "strawberries")
Q.5
The condition for a while loop to continue could include which of the following?
While something equals something
While something is greater than something
While something is True
All of these
Q.6
What button do you press to compile (run) your program so that it runs in the shell?
F3
F5
F7
F9
Q.7
Which two statements are used to implement iteration?
IF and WHILE
ELSE and WHILE
FOR and WHILE
IF and ELSE
Q.8
What would be the output of the following code snippet?
'blue''apple''dog'
colorfruitpet
blueappledog
'color''fruit''pet'
Q.9
Which type of loop iterates until instructed otherwise?
FOR loop
WHILE loop
Q.10
What would print (+produce?
20
22
24
26
Q.11
Which of these is the correct code for creating a list of names?
nameList = John, Harry, Jesse, John, Harry, Harry
nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList = [John, Harry, Jesse, John, Harry, Harry]
Q.12
What will be the output?name = "Dave"print (name)
Dave
'Dave'
name
(name)
Q.13
What will the output be from the following code?print("Hello world!\nHello world!")
Hello world! Hello world!
Hello world!Hello world!
SyntaxError
Hello world!
Q.14
To solve a problem that requires the user to enternumbers would use what type of iteration?
While loop
For loop
Variable
Selection
Q.15
What is the word (command) used to display numbers and text on the screen?
print
input
output
command
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page