Class 9th CBSE

Ch-3 Getting Started with Python

Ch-3 Getting Started with Python

Class 11th CS

Getting Started with Python

(1). Who developed Python Programming Language ?

SOLUTION. Guido Van Rossum in 1990s developed Python programming language.

(2). Is Python an Object Oriented language?

SOLUTION. Yes, Python is an Object Oriented language.

(3). Python is an interpreted high level language”. What does it mean to you?

SOLUTION. Python is a high level language’ means it is programmer-friendly fr., easy to program and comprehend. ‘Python is an interpreted language’ means it requires an interpreter (not compiler) to execute its code line by line-one statement at a time.

(4). What does a cross platform language mean?

SOLUTION. A cross platform language means it can run well on variety of platforms like Windows, Linux/Unix, Macintosh etc. etc.

(5). Python is a Free and Open Source language. What do you understand by this feature?

SOLUTION. It means to download Python, one needs not pay anything, because it is Free. And its source-code is also available, which can be modified/improved etc., because it is open-source.

(6). What is the difference between interactive mode and script made in Python?

SOLUTION. In interactive mode, instructions are given in front of Python prompt (eg. >>> or In[]prompts) in Python Shell. Python carries out the given instruction and shows the result there itself. In script mode, Python instructions are stored in a file generally with .py extension and are executed together in one go as a unit. The saved instructions are known as Python script or Python program.

7. What are data types ? What are Python’s built-in core data types ?
SOLUTION:-

The real life data is of many types. So to represent various types of real-life data, programming languages provide ways and facilities to handle these, which are known as data types, Python’s built-in core data types belong to

Numbers (integer, floating-point, complex numbers, Booleans)
String
Tuple
List
Dictionary

8.Which data types of Python handle Numbers?
SOLUTION Python provides following data types to handle numbers
(i) Integers
(ii) Boolean
(iii) Floating-point numbers
(iv) complex numbers

9. Why is Boolean considered a subtype of integers?
SOLUTION Boolean values True and False internally map to integers 1 and 0. That is, internally True is considered equal to 1 and False equal to 0 (zero). When I and 0 are converted to Boolean through bool() function, they return True and False. That is why Booleans are treated as a subtype of integers.

10.What do you understand by term ‘immutable?
SOLUTION:-
Immutable means unchangeable. In Python, immutable types are those whose values cannot be changed in place. Whenever one assigns a new value to a variable referring to immutable type, variable’s reference is changed and the previous value is left unchanged. e.g.
x=3
x=5

11. What do you mean by Syntax errors and Semantics errors?
SOLUTION :-
Syntax errors are the errors that occur when rules of a programming language violated.
Semantics errors occur when statements are not meaningful.

12.Why are logical errors harder to locate?
SOLUTION :-
In spite of logical errors presence, the program executes without any problems but the output produced is not correct. Therefore, each and every statement of the program needs to b scanned and interpreted. Thus the logical errors are harder to locate.

13. What is an Exception?
SOLUTION :-
Exception in general refers to some contradictory or unusual situation which can be encountered unexpectedly while executing a program.

 

Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable

Popular Videos

Play Video

UX for Teams

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer

Play Video

SEO & Instagram

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer