variable in python

variable in python

University

20 Qs

quiz-placeholder

Similar activities

Quiz # 1 in Capstone Project and Research 1

Quiz # 1 in Capstone Project and Research 1

University

15 Qs

Unit 28 - Quiz #1

Unit 28 - Quiz #1

University

15 Qs

Quiz on List and Tuples

Quiz on List and Tuples

University

16 Qs

Data Structure & Algo - Prelim Long Quiz

Data Structure & Algo - Prelim Long Quiz

University

21 Qs

Introduction to Networking

Introduction to Networking

University

15 Qs

The AI Shield

The AI Shield

University

15 Qs

Data Mining - Classification Mining

Data Mining - Classification Mining

University

15 Qs

 variable in python

variable in python

Assessment

Quiz

Computers

University

Hard

Created by

Prince Kumar

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is a valid variable name in Python?

1variable

variable_1

variable-1

variable 1

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the type of the variable x after executing x = 5.5?

int

str

float

bool

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which keyword is used to define a variable in Python?

var

let

const

No keyword is used

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What will be the output of the following code?

x = "Hello"

y = "World"

print(x + y)

Hello World

HelloWorld

Hello World!

HelloWorld!HelloWorld!

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following statements is true about variables in Python?

Variables in Python must be declared before use.

Variables in Python are dynamically typed.

Variable names in Python can start with a number.

Variables cannot be reassigned after they are created.

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What does the following code do?

x = 10

x = "ten"

Throws a type error

Changes the value of x to "ten"

Raises a syntax error

Changes the value of x to 10

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the output of the following code?

x = 10

print(x + "5")

105

15

Error

x5

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?