What will the following code output? Enter your answer.
NumberList = [ 1, 5, 7, 4, 5, 1, 9, 9 ]
print(NumberList[3])
Lists, Subroutines and Sequence in Pseudocode - Python
Quiz
•
Computers
•
1st - 11th Grade
•
Medium
Tezel Asena
Used 56+ times
FREE Resource
14 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
What will the following code output? Enter your answer.
NumberList = [ 1, 5, 7, 4, 5, 1, 9, 9 ]
print(NumberList[3])
Answer explanation
In programming the index position always starts at 0.
In other words, the first item in a list is in index position 0.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
NumberList = [ 1, 5, 7, 4, 5, 1, 9, 9 ]
Length = len(NumberList)
print(Length)
7
8
9
6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? Enter your answer.
NumberList = [ 1, 5, 7, 4, 5, 1, 9, 9 ]
print(NumberList[1:4])
1
5
7
4
5
7
4
5
7
4
5
1
5
7
4
5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In regards to a type of array called lists, what does the append method do?
Adds a single item to a list.
Removes a single item from a list.
Randomly shuffles all items in a list.
Creates a new list.
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Enter the name of the module or library you would want to use for drawing shapes and patterns in Python.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the maximum number this program can randomly output?
import random
print(random.randrange(0, 1000))
10000
1000
999
1001
Answer explanation
When checking range values, never include the end/stop or last value.
This is because index position starts at 0 not 1 so the last is always missed.
(0, 100) - this actually means 0 to 99.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
This type of subroutine passes and returns values.
What am I?
Procedure
Function
10 questions
Dasar-Dasar Algoritma
Quiz
•
10th - 12th Grade
19 questions
Google Docs Vocabulary Part 2
Quiz
•
7th Grade
15 questions
list in python
Quiz
•
10th - 12th Grade
11 questions
Flowcharts and Pseudocode
Quiz
•
6th Grade
15 questions
Problem Analysis
Quiz
•
1st Grade
13 questions
Entry Level - Programming Techniques
Quiz
•
8th - 9th Grade
16 questions
Flowcharts
Quiz
•
9th - 11th Grade
10 questions
IGCSE Computer Science - Chapter 9: Problem-Solving and Design
Quiz
•
9th - 10th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade