Search Header Logo

Python Variables - Quiz2

Authored by Vindhya Gaddam

English

1st - 5th Grade

Used 1+ times

Python Variables - Quiz2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Imagine you are going to a supermarket you need to buy some things and needs to store in a bag similarly create a variable names as bag and store at least two things that must be a string type?

bag="mango"

bag="apple","mango"

bag=10

bag="apple"

2.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

What symbol is used in python to assign values to a variable?

==

:

=

*

3.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

You wants to write a program to keep a record of temperatures. Which DATA TYPE would be most suitable for a variable called "temperature"?

An integer

A string

A boolean

A float

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following cannot be a Python variable name? 

Name

var-1

name

name_2

5.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following statements are correct?

The variable names cannot start with a digit

Variable names can be reserved keywords

Variable names cannot start with the underscore _

Variables names in Python are case-sensitive.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

   x=5

      y=x+2

     x+=y

   y=x

       print(x)

       print(y)

x=5,y=7

x=12,y=7

x=12,y=12

x=5,y=12

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

hat is the output of the following code?

x='Hello '

y='World'

print(x+y)

'HelloWorld'

Syntax Error

'Hello+World'

Runtime Error

Access all questions and much more by creating a free account

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

Already have an account?