Class 10 Computer Science · Chapter 3 · Test 2
Test 2: Variables, Input/Output and Operators
30 questions · 25 min · 30 marks
Want to try first? Take the free Computer Science test: 94hbp-7gz9m-ufent-tsj4r
Sample questions
The first 5 of 30. Try each one, then tap to see the answer.
Question 1
A variable in programming functions as:
- AA storage container within a computer's memory
- BA type of operator
- CA comment
- DA printer
Show answerHide answer
Answer: A
A variable stores data that can be retrieved later in the code.
Question 2
A variable is called a variable because its value:
- ANever changes
- BIs always text
- CCan change throughout the execution of a program
- DIs always zero
Show answerHide answer
Answer: C
The example assigns age = 71 and later age = 60.
Question 3
A Python variable name must begin with:
- AA digit
- BA letter or an underscore
- CA space
- DA symbol like @
Show answerHide answer
Answer: B
The name must begin with a letter (a-z, A-Z) or an underscore.
Question 4
In Python, age and Age are:
- AThe same variable
- BSyntax errors
- CTwo different variables
- DComments
Show answerHide answer
Answer: C
Variable names are case-sensitive.
Question 5
Which of the following cannot be used as a variable name?
- Aage
- B_count
- Cfor
- DAge
Show answerHide answer
Answer: C
for is a reserved keyword.
More tests in Introduction to Python Programming
- Test 1: Introduction, Python Setup and Comments
MCQs · 30 questions · 25 min · 30 marks
- Test 3: Complete Chapter Review
MCQs · 30 questions · 25 min · 30 marks
- Test 4: Short Questions – Part 1
Short questions · 23 questions · 50 min · 47 marks
- Test 5: Short Questions – Part 2
Short questions · 24 questions · 50 min · 52 marks
- Test 6: Long Questions
Long questions · 9 questions · 50 min · 61 marks
Practise with a free account
Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.