2. Variables and Data Types

2. Variables and Data Types

5th Grade

20 Qs

quiz-placeholder

Similar activities

08-23(57). Язык программирования. Система программирования

08-23(57). Язык программирования. Система программирования

5th Grade

20 Qs

Lesson 31 Test-4

Lesson 31 Test-4

5th - 8th Grade

15 Qs

1.  Python History and Basic Syntax

1. Python History and Basic Syntax

5th Grade

15 Qs

Python DataTypes Quiz

Python DataTypes Quiz

5th Grade

25 Qs

What about technology? - Codeweek 2022

What about technology? - Codeweek 2022

5th - 11th Grade

20 Qs

Scratch Coding

Scratch Coding

1st - 5th Grade

15 Qs

python

python

1st - 9th Grade

18 Qs

Lession 47 - Test-6

Lession 47 - Test-6

5th - 8th Grade

15 Qs

2. Variables and Data Types

2. Variables and Data Types

Assessment

Quiz

Education

5th Grade

Easy

Created by

Robotic Schools

Used 132+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

📚 Sarah is buying 5 books on an e-commerce website. She stores the number of books in a variable. Which of the following is the correct way to declare this variable in Python? 🐍

int books = 5

books = 5

declare books = 5

variable books = 5

2.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

What is the primary purpose of comments in code? 💬

To make the code run faster ⚡

To prevent certain code from executing 🚫

To explain the code and make it more readable 📖

To declare variables 📝

3.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

💪 A user enters their weight in kilograms on a fitness app. If user_weight = 70.5, what will the data type of user_weight be? 🐍

int

float

str

bool

4.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

🎮 John is naming a variable to store his score. Which of the following is NOT a valid variable name in Python?

playerScore

score_1

1score

gameScore

5.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

🏦 In a bank transaction system, if a user tries to add a string and an integer, like in the code below, what will happen?

600

"500100"

Error

None of the above

6.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

📱 A user inputs their phone number into a website form as a string. How can you convert to a string in Python? 🤔

str(1234567890)

convert(1234567890)

str.int(1234567890)

string(1234567890)

7.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

💳 In an online payment system, if amount = 100 and currency = "USD", what will be the result of amount + int(currency)? 🤔

USD100

100USD

Error

None of the above

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?