Python Variables

Python Variables

7th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

9G4 CS Python Programming Sequence and Vocabs

9G4 CS Python Programming Sequence and Vocabs

9th Grade

13 Qs

Мотылек

Мотылек

6th - 8th Grade

14 Qs

TIN 11 - PYTHON - PHÉP TOÁN - BIỂU THỨC - CÂU LỆNH GÁN

TIN 11 - PYTHON - PHÉP TOÁN - BIỂU THỨC - CÂU LỆNH GÁN

11th Grade

10 Qs

hardware and software(g3)

hardware and software(g3)

2nd - 10th Grade

10 Qs

Microbit Features Activity

Microbit Features Activity

6th - 8th Grade

9 Qs

Latihan Soal PTS Kelas 6 Semester 1

Latihan Soal PTS Kelas 6 Semester 1

10th Grade

10 Qs

KD 3.1_Aplikasi Pengolah Angka / Spreadsheet

KD 3.1_Aplikasi Pengolah Angka / Spreadsheet

10th Grade

15 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Python Variables

Python Variables

Assessment

Quiz

Computers

7th - 12th Grade

Hard

Created by

Janelle Yearwood

Used 90+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of data is the following?: X = "195.67"

Float

String

Boolean

integer

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of variable is the following?: Y = False

Float

String

Integer

Boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following Python program print?

X = "Hello World!"

Y = "I can code "

Z = " In Python"

print( X + Y + Z)

Hello World! I can code In Python

Hello World!I can code In Python

Hello World! I can codeIn Python

Hello World!I can code In Python

Answer explanation

There is a space after the word "code" and before the word "In".

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Variables have three things:

Numeric, string, Boolean

Integer, float, string

name, type, value

function, value, name

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When you want to print something to the screen you should use

The keyboard to type it

The computer Display

A monitor

a print statement

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

print("Python " * 3); will print out what

Python 3 Python 3 Python 3

Python Python Python

PythonPythonPython

Python*3 Python*3 Python*3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one to the following Python programs will not run?

num = 4

greeting = "Hello"

print(num + greeting)

grade = 98.7

letterGrade = "A+"

print(str(grade) + letterGrade

studentNum =80

print("studentNum")

print("Hello World!")

Answer explanation

You cannot concatenate a string and an integer. the integer must be converted to a string.

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?