
Practice
Flashcard
•
Other
•
Vocational training
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

11 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which of the following is a valid variable name in Python? Cannot start with numbers, symbols. Cannot be any keywords. 1variable, @var, my_var, for
Back
my_var
Answer explanation
Variable in Python must start with a letter or underscore and cannot be keywords. my_var is valid, while the others violate these rules.
2.
FLASHCARD QUESTION
Front
What is the output of the following Python code?
print(type(3.14))
Back
float
Answer explanation
3.14 is a floating-point number in Python, and its type is float.
3.
FLASHCARD QUESTION
Front
What will be the output of this code?
x = 5
y = 10
print(x + y)
Back
15
Answer explanation
The + operator adds the two integers, 5 and 10, resulting in 15.
4.
FLASHCARD QUESTION
Front
Which of the following is the correct way to declare a variable in Python? var x = 10, x == 10, x = 10 , None of the above
Back
x = 10
Answer explanation
Python uses = for variable assignment without needing a type declaration like in some other languages.
5.
FLASHCARD QUESTION
Front
Which of the following is invalid? _a = 1, __a = 1, __str__ = 1, none of the mentioned
Back
none of the mentioned
6.
FLASHCARD QUESTION
Front
Which of the following variable names is not valid in Python? a) my_var, b) _myvar, c) 2myvar, d) myVar2
Back
2myvar
7.
FLASHCARD QUESTION
Front
What is the result of this arithmetic operation in Python? 10 // 3
Back
3
Answer explanation
The // operator performs integer division, discarding the decimal part, so 10 // 3 results in 3.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Review - Proving Congruent Triangles
Flashcard
•
KG - University
10 questions
Ukrainian Language Learning
Flashcard
•
University
13 questions
Journalism Principles
Flashcard
•
University
9 questions
The Forgetting Curve
Flashcard
•
12th Grade
7 questions
How to Make a Cup of Tea
Flashcard
•
12th Grade
10 questions
Unit 104 SITE PREP
Flashcard
•
Professional Development
10 questions
Can you...?
Flashcard
•
Professional Development
5 questions
Introduction to Software Engineering
Flashcard
•
KG
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade