variable in python

Quiz
•
Computers
•
University
•
Hard
Prince Kumar
Used 3+ 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 Workshop 1 review

Quiz
•
University
20 questions
ITIPT01 Quiz No 1

Quiz
•
University
20 questions
1st Year quiz

Quiz
•
University
20 questions
GirlsWhoML Workshop 0

Quiz
•
University
20 questions
1212 Midterm Review

Quiz
•
University
25 questions
PYTHON PROGRAMMING STRING Q6

Quiz
•
University
20 questions
Translators and Computing Languages: GCSE 9-1

Quiz
•
9th Grade - University
15 questions
SCRIPTING PROGRAMMING WITH PYTHON

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University