0201023_classwork_97496
0201023_classwork_97496
PART-1
1|Page
Computer is an electronic device that process data and gives the result in the form of information
Software are recorded instructions and programs that governs the working of a computer.
Eg- OS
2. Application Software- It is a user created software that carry out certain instruction
to perform a specific task
An application software has two ends – front end and back end
Front end- It is the design part of the application software which we are able to see. This view is designed
using programming languages .
Back end- It is the area where the data are being stored. Data is retrieved from the backend called the database
according to the requirements of the user.
Memory of a computer is a predefined area where it stores data . Memory of a computer is volatile. In
memory, data are stored in the form of binary digits(0 and
1).Memory is considered as a cell which is fragmented into
smaller parts called bits. A bit is an elementary unit of memory
1 0 1 0 0 1 1 0
Memory unit is the amount of data that can be stored in the storage unit.
SNO UNIT
1 Bit (Binary Digit)-A binary digit is logical 0 and 1 representing a passive or an active state of a component
in an electric circuit.
3 Byte-A group of 8 bits is called byte. A byte is the smallest unit, which can represent a data item or a
character.
SNO UNIT
3|Page
Compiler and Interpreter
We write a computer program using a high-level language. A high-level language
is one which is understandable by humans. It contains words and phrases from the
English or other language. But a computer does not understand high-level
language. It only understands program written in 0's and 1's in binary, called the
machine code. A program written in high-level language is called a source code.
We need to convert the source code into machine code and this is accomplished
by compilers and interpreters. Hence, a compiler or an interpreter is a program
that converts program written in high-level language into machine code
understood by the computer.
Interpreter Compiler
Continues translating the program Translates the program till the end
until the first error is met, in which and reports the errors all together
case it stops. Hence debugging is
easy.
4|Page
PYTHON PROGRAMMING LANGUAGE
Python is a Object Oriented Programming Language developed by Guido Van Rossum in
1991. It was based on two other programming languages
✓ Modula-3
It is an interpreted language as it interprets and executes code line by line . Python is case-
sensitive.
Features of Python
➢ Easy to use:- It is a OOP’s language which is very user friendly ( does not have much
format/syntax)
Drawbacks of Python
➢ Lesser built in libraries- Python does not support many built in functions.
5|Page
PYTHON FUNDAMENTALS
Tokens
✓ Keywords
✓ Identifiers
✓ Literals
✓ Operators
✓ Punctuators
I. Keywords:- Keywords are words that convey a special meaning to the interpreter
.They are reserved words that cannot be used for any other purpose
6|Page
Some of the keywords are:
II. Identifiers:- They are the fundamental building blocks of a program. They are the names
given for different part of a program like variables.
✓ It can be combination of letters or digits but the first character should be a letter
✓ The identifier can start with an underscore or letters but not with a digit
Qn: Identify the following as valid or invalid identifier. If invalid, justify your answer
Ans:
Identifier Valid/Invalid
file13 Valid
AND Valid
_D5 Valid
Return Valid
_6 Valid
8|Page