
Quiz on Variables and Constants in Programming
Authored by Larry Jones
Information Technology (IT)
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in programming?
A storage location that holds a value which can change
A fixed value that cannot change
A sequence of characters
A type of data that holds true or false
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a constant?
PI = 3.14159
temperature = 36.5
name = 'Alice'
score = 85
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of data does an integer hold?
Whole numbers without decimals
Numbers with decimal points
Single characters
Sequences of characters
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid example of a floating point?
is_student = false
grade = 'B'
temperature = 98.6
age = 30
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a boolean data type represent?
Decimal numbers
Whole numbers
A sequence of characters
True or false values
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct definition of a constant?
A storage location with a fixed value
A method to store user input
A storage location that can change
A type of variable
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of using variables in a program?
To define data types
To hold values that can change
To create constants
To store fixed values
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?