Learning Outcomes

Learning Outcomes

Professional Development

10 Qs

quiz-placeholder

Similar activities

PYTHON QUIZ3

PYTHON QUIZ3

University - Professional Development

10 Qs

L1_W5_Time_Machine

L1_W5_Time_Machine

Professional Development

11 Qs

Control de Estructuras_Booleans & Comparisons

Control de Estructuras_Booleans & Comparisons

Professional Development

6 Qs

Networking Finals

Networking Finals

Professional Development

10 Qs

Python day3(Team 1)

Python day3(Team 1)

Professional Development

15 Qs

FP2: 02 - STRINGS

FP2: 02 - STRINGS

Professional Development

10 Qs

CSE-C1-Quiz-8-25-11-2022

CSE-C1-Quiz-8-25-11-2022

Professional Development

8 Qs

Quizz_Python_1

Quizz_Python_1

Professional Development

10 Qs

Learning Outcomes

Learning Outcomes

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Patrick Toner

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A loop repeats an action until a condition is met. What is a loop?

A sequence of instructions that is continually repeated until a certain condition is reached.

A single execution of a set of instructions.

A type of variable used in programming.

A method to store data in a database.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Write a basic Python loop (using for) to repeat a simple task. Goal: You will write a basic Python loop (using for) to repeat a simple task. Example: Print your name 3 times.

for i in range(3): print('Your Name')

while i < 3: print('Your Name')

print('Your Name' * 3)

repeat 3 times: print('Your Name')

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Fill in the blank: A loop is a piece of code that runs again and again until we tell it to ____.

stop

start

pause

continue

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A for loop is used to:

Iterate over a sequence of elements

Define a function

Store data in a variable

Terminate a program

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? for i in range(5): print('Hello, world!')

Prints 'Hello, world!' 5 times

Prints 'Hello, world!' 4 times

Prints 'Hello, world!' 6 times

Does not print anything

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the code example, what does 'range(5)' do?

Creates a list of numbers: 0, 1, 2, 3, 4

Creates a list of numbers: 1, 2, 3, 4, 5

Creates a list of numbers: 0, 1, 2, 3, 4, 5

Creates a list of numbers: 1, 2, 3, 4

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Change the code to print your name 3 times. for i in range(3): print("Your Name")

for i in range(3):\n print("Your Name")

for i in range(3):\n print("My Name")

for i in range(3):\n print("Your Name" * 3)

for i in range(3):\n print("My Name" * 3)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?