XIth IP Python
XIth IP Python
Q.1 State the basic units of computer. Name the subunits that make up the
CPU, and give the function of each of the unit.
Ans: Basic units of computer are Input Unit, Central Processing Unit and Output
Unit. Sub unites of CPU are Arithmetical Logical Unit(ALU), Control Unit (CU)
and Memory Unit(MU).
Q.2 What is the function of memory? What are its measuring units?
Ans: The computer memory is a temporary storage area. It holds the data and
instructions that the Central Processing Unit (CPU) needs. Before a program can
run, the program is loaded from some storage medium into the memory. This
allows the CPU direct access to the program. Its measuring units are byte,
kilobyte, megabyte, gigabyte, terabyte etc.
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.5 What is SoC? how it is different from CPU? Why is it considered a better
development?
Ans: A system on a chip (SoC) combines the required electronic circuits of various
computer components onto a single, integrated chip (IC). SoC is a complete
electronic substrate system that may contain analog, digital, mixed-signal or
radio frequency functions. Its components usually include a graphical processing
unit (GPU), a central processing unit (CPU) that may be multi-core, and system
memory (RAM).
Because SOC includes both the hardware and software, it uses less power, has
better performance, requires less space and is more reliable than multi-chip
systems. Most system-on- chips today come inside mobile devices like
smartphones and tablets. These are considered a better development because of
their small size and speed capability.
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.10 What do you understand by input unit? What is its significance? What
does computer system consist of?
Ans: Input unit is formed by the input devices(Keyboard, mouse, MICR, OBCR etc.)
attached to the computer. Input unit is responsible for taking input and
converting it into computer understandable form(the binary code). Some
common input devices are:
(i) Keyboard
(viii) Magnetic Ink Character
(ii) Mouse Reader
(iii) Microphone (ix) Touch Pad
(iv) Scanner (x) Track Ball
(v) Webcam (xi) Joy stick
(vi) Optical Bar Code Reader (xii) Touch Screen
(vii) Optical Mark Reader (xiii) Biometric Sensors. Etc.
Q.11 What is the function of CPU in a computer system? What are its sub units?
Ans: The central processing unit (CPU) of a computer is a piece of hardware that carries
out the instructions of a computer program. It performs the basic arithmetical,
logical, and input/output operations of a computer system. The CPU is like the
brains of the computer - every instruction,
no matter how simple, has to go through the CPU. So let's say you press the
letter 'k' on your keyboard and it appears on the screen - the CPU of your
computer is what makes this possible. The CPU is sometimes also referred to as
the central processor unit, or processor for short. So when you are looking at the
specifications of a computer at your local electronics store, it typically refers to
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.16 What are RAM and ROM? How are they alike? How are they different?
What are PROM, EPROM, EEPROM?
Ans: A ROM chip is a non-volatile storage medium, which means it does not require a
constant source of power to retain the information stored on it.
A RAM chip is volatile, which means it loses any information it is holding when the
power is turned off. Both of them are known as primary memory as they can
directly work with CPU.
▪ Read Only Memory (ROM)
▪ Programmable Read Only Memory (PROM)
▪ Erasable Programmable Read Only Memory (EPROM)
▪ Electrically Erasable Programmable Read Only Memory (EEPROM)
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Ans:
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.25 How are software libraries useful? Name some software libraries of
Python.
Ans: A software library is a predefined and available to use, suit of data and
programming code in the form of prewritten code/ functions/scripts/classes etc.
that can be used in the development of the new software programs and
applications.
Some software library in python are:
(i) NumPy (numerical Python)
(ii) SciPy (Scientific Python)
(iii) Pandas Library
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.3 Python is a Free and Open Source language. What do you understand by
this feature?
Ans- It means Python is freely available without any cost. Its source code is also available. One
can modify, improve/extend an open source software.
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.5 What is the difference between Interactive mode and Script Mode in
Python?
Ans- In interactive mode, one command can run at a time and commands are not saved.
Whereas in Script mode, we can save all the commands in the form of a program file and can
see output of all lines together.
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.2 Write Instructions in python to get the following result: (Do it in both
interactive mode and script mode)
I am a student of MSS Kishangarh
I live in Kishangarh
In Script Mode-
print("I am a student of MSS Kishangarh \n I live in Kishangarh \n And I love
Kishangarh \n\n Kishangarh is 20 KM away from Ajmer \n This Place is famous for
Marble")
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Chapter – 3: PYTHON
FUNDAMENTALS
Very Short answer Type
Questions
Q.1 What is None literal in Python?
Ans: Python has one special literal, which is None. The None literal is used to
indicate absence of value. It is also used to indicate the end of lists in
Python. It means “There is nothing here”.
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.2 What are literals in Python? How many types of Literals allowed in Python?
Ans: Literals: Python comes with some built-in objects. Some are used so often
that Python has a quick way to make these objects, called literals.The literals
include the string, Unicode string, integer, float, long, list, tuple and dictionary
types.
(i) String
(ii) List
(iii) Tuple
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.6 What are tokens in Python? How many types of tokens allowed in Python?
Ans: Tokens are the smallest unit of the program. There are following tokens in Python:
• Reserved words or Keywords
• Identifiers
• Literals Definition of all tokens may come. Which
is not given
• Operators in this question bank.
• Punctuators
Q.7 What are operators? What is their function? Give examples of some
unary and binary operators.
Ans: “Operators are those symbols used with operands, which tells compiler which
operation is to be done on operands.” in other words – “operators are tokens
that trigger some computation/action when applied to variables and other
objects in an expression.”
Operators are of following types:
▪ Unary operators like (+) Unary Plus, (-) Unary Minus, not etc.
▪ Binary Operators like (+) addition, (*) multiplication, and etc.
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.9 What is the role of indentation in Python?
Ans: Indentation plays a very important role in Python. Python uses indentation to
create blocks of code. Statements at same indentation level are part of same
block/suit. You cannot unnecessarily indent a statement; python will raise an
error for that.
Q.3 Which of the following are syntactically correct strings? State reason.
(a) ”Python is nice Language”
(b) „He called me “Friend!” when he came‟
(c) “Very Good‟
(d) „This is a good book‟
(e) “Namaste
(f) “I liked „Harry Potter‟ very much”
Ans: (a) Correct (b) Correct (c) Incorrect (d) Correct (e) Incorrect (f) Correct
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.4 What is the error in following Python program with one statement?
print(“My name is : “, name)
suggest a solution
Ans: Error is : “name 'name' is not defined”. And the solution is to declare the
variable-name before this statement.
Ans: Output: 17 5
Ans: Output: Hari , you are 18 now but You will be 19 next year
Ans:
Ans: Output: 4 6 8
Q.9 WAP to read todays date (only date Part) from user. Then display
how many days are left in the current month.
Ans:
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in
CLASS XI – INFORMATICS PRACTICES
BOOK REFERENCE – SUMITA ARORA
Q.10 WAP to print the area of circle when radius of the circle is given by user.
Ans:
Q.11 WAP to print the volume of a cylinder when radius and height of the
cylinder is given by user.
Ans:
Q.12 WAP that asks your height in centimeters and converts it into foot and inches.
Ans:
Ans:
First floor, Opposite Bank of Baroda, Ajmer Road, Madanganj-Kishangarh (Raj) Contact : +91 98291 71122
Email : infotechcomputer@gmail.com, Website : www.infotechcomputer.in