Python Basics Quiz 1

Python Basics Quiz 1

8th Grade

15 Qs

quiz-placeholder

Similar activities

csharp

csharp

University

10 Qs

Python for beginners

Python for beginners

University

20 Qs

Homework 1 Edublocks

Homework 1 Edublocks

7th - 9th Grade

12 Qs

Flow of Control

Flow of Control

11th - 12th Grade

18 Qs

Selection in Python

Selection in Python

1st - 9th Grade

15 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Python Control Statements

Python Control Statements

University

10 Qs

Python Testing

Python Testing

9th - 12th Grade

10 Qs

Python Basics Quiz 1

Python Basics Quiz 1

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Shaun Morrison

Used 5+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to print "Hello, World!"?

print("Hello, World!")

echo "Hello, World!"

printf("Hello, World!")

System.out.println("Hello, World!")

Answer explanation

The correct way to print "Hello, World!" in Python is using the print() function.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to assign the value 10 to a variable named number in Python?

number = 10

int number = 10

10 = number

number := 10

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

Greater

3

5

No output

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following statements correctly uses `elif` in Python?

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

High

Low

3

No output

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a comparison operator?

+

=

==

*

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will be the output of the following code snippet?

x is less than y

x is equal to y

x is greater than y

No output

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?