Python introduction 2.1

Python introduction 2.1

8th Grade

27 Qs

quiz-placeholder

Similar activities

Microbit Code

Microbit Code

7th - 8th Grade

22 Qs

Computer Pretest2(Python Grade7_t1)

Computer Pretest2(Python Grade7_t1)

2nd Grade - University

30 Qs

Key Programming Concepts

Key Programming Concepts

5th - 12th Grade

28 Qs

TERM 2_TEST 2_YEAR 8_CHAPTER 3

TERM 2_TEST 2_YEAR 8_CHAPTER 3

8th Grade

30 Qs

Python Vocab Chapters 1-6

Python Vocab Chapters 1-6

8th Grade - University

25 Qs

KDL và biến trong Python

KDL và biến trong Python

6th - 8th Grade

24 Qs

Introduction to Python Programming

Introduction to Python Programming

8th Grade

25 Qs

Codeforlife python worksheet 2 - Variables, Input and Casting

Codeforlife python worksheet 2 - Variables, Input and Casting

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?