Python introduction 2.1

Python introduction 2.1

8th Grade

27 Qs

quiz-placeholder

Similar activities

Operating system

Operating system

7th Grade - University

25 Qs

TLE Q3 EXAM REVIEWER

TLE Q3 EXAM REVIEWER

8th Grade

25 Qs

computer 2

computer 2

8th Grade

23 Qs

Tiết 70 Tin học 8

Tiết 70 Tin học 8

8th Grade

25 Qs

PRETEST SCRATCH KELAS 9

PRETEST SCRATCH KELAS 9

8th Grade

25 Qs

Programming Techniques

Programming Techniques

8th - 10th Grade

30 Qs

Ulangan Informatika Kelasa 8 Sistem Komputer PAKET A

Ulangan Informatika Kelasa 8 Sistem Komputer PAKET A

8th Grade

25 Qs

EV3 Lego Mindstorms Classroom 1

EV3 Lego Mindstorms Classroom 1

8th Grade

26 Qs

Python introduction 2.1

Python introduction 2.1

Assessment

Quiz

Computers

8th Grade

Medium

Created by

M Ellis

Used 2+ times

FREE Resource

27 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why use comments in a program?

To make the program run faster

To add explanations for the code

To increase the file size

To change the programming language

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What character is used to add comments in Python?

$

@

#

&

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What happens to the text after the # character in Python?

It is executed by the computer

It is ignored by the computer

It causes an error

It is converted to a string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the purpose of creating a new variable called average in the program?

To store the first number

To display the total of the numbers

To calculate the average of the three numbers

To input the second number

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the formula used to calculate the average of the three numbers?

average = total/2

average = total/3

average = total/number3

average = total*3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `int(input())` function in the Python code?

To display a message

To convert user input into a string

To convert user input into an integer

To calculate the average

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `print('Total', total)` line do in the code?

It calculates the total

It prints the total value

It inputs the total from the user

It resets the total to zero

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?