What is the correct way to declare a variable in Python?

Python Basics Quiz

Quiz
•
Information Technology (IT)
•
1st Grade
•
Hard

Amira Abd El-aziz
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
a) x : int = 5
b) int x = 5
c) x = 5
d) declare x = 5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid variable name?
a) student_name
b) 3score
c) _age
d) price$
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the data type of the following variable? num = 10.5
a) int
b) float
c) str
d) bool
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? x = "10" y = 5 print(x + y)
a) 15
b) 105
c) Error
d) "10 5"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data types can store decimal numbers?
a) int
b) bool
c) float
d) str
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? print("Hello", "World", sep="-")
a) Hello-World
b) Hello World
c) Hello, World
d) Hello- World
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of print(5, 10, 15, end="!")?
a) 5 10 15
b) 5 10 15!
c) 5, 10, 15
d) Error
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Bab 3 Bagian A-D Pengenalan Komputer

Quiz
•
1st Grade
20 questions
Quiz sobre Java e Programação

Quiz
•
1st Grade
21 questions
ICT 3rd QT

Quiz
•
1st Grade
25 questions
Javascript

Quiz
•
1st - 5th Grade
21 questions
Scopri il Mondo dei Fogli di Calcolo

Quiz
•
1st Grade
15 questions
Kuis Perakitan Komputer

Quiz
•
1st Grade
24 questions
Test pre hackathon

Quiz
•
1st - 5th Grade
20 questions
Library Python Pert-12

Quiz
•
1st Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade