Python Random and Turtle Quiz

Python Random and Turtle Quiz

9th Grade

40 Qs

quiz-placeholder

Similar activities

Latihan ASAJ

Latihan ASAJ

9th Grade

40 Qs

Lớp 7 chủ đề 1 p2

Lớp 7 chủ đề 1 p2

7th Grade - University

44 Qs

ASTS TIK 5 GENAP

ASTS TIK 5 GENAP

5th Grade - University

35 Qs

Computer Hardware Quiz

Computer Hardware Quiz

9th - 12th Grade

35 Qs

Infographics Quiz

Infographics Quiz

9th Grade - University

40 Qs

Kisi-Kisi Asesmen Tengah Semester 2 Informatika TP 2024 / 2025

Kisi-Kisi Asesmen Tengah Semester 2 Informatika TP 2024 / 2025

9th Grade

42 Qs

Entrepreneurship & Small Business V.2 - Vocabulary Quiz (Part 1)

Entrepreneurship & Small Business V.2 - Vocabulary Quiz (Part 1)

9th Grade

40 Qs

TRẮC NGHIỆM CHỦ ĐỀ E3

TRẮC NGHIỆM CHỦ ĐỀ E3

9th Grade

40 Qs

Python Random and Turtle Quiz

Python Random and Turtle Quiz

Assessment

Quiz

Information Technology (IT)

9th Grade

Easy

Created by

Fadi Fadi

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of random.randint(2, 8)?

A random integer between 2 and 7

A random float between 2 and 8

A random integer between 2 and 8 (inclusive)

Always returns 5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way to import the random module to use randint?

import randint

from os import random

import random

from math import randint

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when random.randint(1, 1) is executed?

Returns 1

Returns None

Raises an error

Returns a random number between 0 and 1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these random.randint() calls is invalid?

random.randint(1, 100)

random.randint(5, 10)

random.randint(-5, 5)

random.randint(10, 5)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary use of the random module?

Sorting lists alphabetically

Generating random numbers or selections

Creating random images

Performing mathematical calculations

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does pen.penup() do in the Turtle module?

Moves the turtle backward

Lowers the pen to start drawing

Lifts the pen to stop drawing

Rotates the turtle

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command correctly moves the turtle forward by 50 units?

pen.forward(50)

pen.up(50)

turtle.left(50)

turtle.move(50)

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?