Lesson 7 Python

Lesson 7 Python

10th Grade

27 Qs

quiz-placeholder

Similar activities

Computer Science Unit 3 Quiz

Computer Science Unit 3 Quiz

8th - 10th Grade

27 Qs

Programming with Python Section 2.1 and 2.2

Programming with Python Section 2.1 and 2.2

9th - 12th Grade

23 Qs

Robotics Review for Midterm 2021

Robotics Review for Midterm 2021

9th - 12th Grade

31 Qs

Arduino BOE Bot MS

Arduino BOE Bot MS

9th - 12th Grade

25 Qs

PDM EOC

PDM EOC

9th - 12th Grade

24 Qs

Basic Python Programming Quiz

Basic Python Programming Quiz

10th Grade

25 Qs

M6_Visual Basic_Final Quiz1

M6_Visual Basic_Final Quiz1

10th - 12th Grade

23 Qs

Kiểm tra Tin 11 cuối học kì 1 2022-2023

Kiểm tra Tin 11 cuối học kì 1 2022-2023

1st - 10th Grade

28 Qs

Lesson 7 Python

Lesson 7 Python

Assessment

Quiz

Other

10th Grade

Hard

Created by

Ramadhan Ramadhan

Used 1+ times

FREE Resource

27 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: print(list(range(5)))?

[0, 1, 2, 3, 4, 5]

[0, 1, 2, 3, 4]

[0, 1, 2, 3]

[1, 2, 3, 4, 5]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a function in Python?

function_name: parameters =>

create function_name(parameters)

function_name(parameters) =>

def function_name(parameters):

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to create a loop in Python?

for, while

iterate

repeat

looping

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: if 5 > 3: print('True') else: print('False')?

Maybe

True

False

I don't know

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you take user input in Python?

Use the 'read()' function to take user input.

Use the 'scan()' function to take user input.

Use the 'input()' function to take user input.

Use the 'get()' function to take user input.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'break' statement in a loop?

To pause the loop for a specified time.

To skip the current iteration and exit the loop.

To exit a loop prematurely.

To continue to the next iteration of the loop.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you call a function named 'my_function'?

invoke my_function()

call my_function()

execute my_function

my_function()

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?