Question – Answer
Name two categories of programming concepts.
Ans.
The two categories of programming concepts are:
(i) Procedure Oriented programming (ii) Object Oriented programming
2. Name to procedure oriented and two object oriented programming languages.
Ans.
(i) Two procedure oriented, languages are FORTRAN and BASIC. (ii) Two object
oriented, languages are Java and Python.
3. Name two different modes of writing codes in Python.
Ans.
The two different modes of writing Python codes are:
(i) Interactive Mode (ii) Script Mode
4. Name any two object-oriented programming languages.
Ans. The two object-oriented programming languages are C++ and Java.
5. What do you mean by an interpreter? Explain.
Ans. An interpreter is a language processor which converts the source code into
machine code. An interpreter converts the instructions written in high level
language line-by-line into its machine code. The control does not move to the
next line of statement, until the previous one is corrected.
6. What does a cross platform language mean?
Ans. A cross platform language means a program which can also run on the other
platforms, viz. UNIX,
LINUX, Windows, Macintosh, etc.
7. What are identifiers?
Ans. An identifier is the name given to an indented programming block such as a
function name or a class name. A variable is also an identifier that contains a
value.
8. What is a literal?
Ans. A literal is a constant that remains fixed throughout the execution of a
program. A literal is a value that can be assigned to a specific variable.
For example, Integer literals: 12, 4, 342, etc.
9. Distinguish between an expression and a statement.
Ans. An expression is a set of variables, constants and arithmetical operators
used together to yield a meaningful result. On the other hand, when an
expression is assigned to a variable, refer to as a
10. Assertion and Reason based question:
Assertion (A): Python language is case sensitive.
Reason (R): The case sensitive means, it differentiates between the uppercase
and lowercase letters, while using them as identifiers.
Based on the above assertion and reasoning, pick an appropriate statement from
the options given below:
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true and R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
(e) Both A and R are false.
Ans. (a) Both A and R are true and R is the correct explanation of A.
11. Application based questions:
) Sangita is a student of Grade IX. While designing Python code, she always keeps
the fact in mind that the variable name should not be the reserved word. If these
words are used in the structure of Python program, Python interpreter will
recognise them and it will result in an error. Which of the following reserved
words is she talking about to overcome the problem?
(a) Identifiers
(b) Keywords
(c) Variables
(d) Literals
Ans.
(b) Keywords
(i) Python is a good programming language for beginners. It is highly productive
as compared to other programming languages like C++ and Java. It is also very
famous for its simple programming syntax, code readability and 'English-like'
commands that make coding in Python a lot easier and efficient.
Read the above paragraph to answer the following questions:
(a) Name the language translator used in Python programming language.
(b) Name one object programming and procedure programming language.
Ans.
(a) Interpreter
(b) i) Object Oriented Programming language: Java ii) Procedure Oriented
Programming language: BASIC