variable in python

Quiz
•
Computers
•
University
•
Hard
Prince Kumar
Used 2+ times
FREE Resource
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
Similar Resources on Wayground
16 questions
Python Basics

Quiz
•
KG - University
20 questions
Basics of programming - Quiz - 01

Quiz
•
University - Professi...
15 questions
Scope of Variables in Python

Quiz
•
1st Grade - Professio...
20 questions
Python Strings

Quiz
•
University
20 questions
AI BootCamp: 2024 Edition- Session 1

Quiz
•
University
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
20 questions
Python 1

Quiz
•
University
20 questions
Python Recap

Quiz
•
7th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade