Pps Notes Unit-1 (2024 Pattern)
Pps Notes Unit-1 (2024 Pattern)
1
PPS Unit-I SKNSITS
(c) In this type of approach there is no straight forward defined path which we can
follow to solve a problem.
(d) We need to build that path based on trial and error.
(e) In this approach experience and knowledge is very important.
Problem Definition:
Before a program is written for solving a problem, it is important to define the
problem clearly.
Define problem: Problem is defined as a situation or issue or condition
which needs to solve to achieve the goal.
For most of the software projects, the system analyst approach system users
to collect user requirements and define the problem that the system aims to
solve.
System analyst typically looks at following issues:
o What input is required for achieving expected output?
o Expected output of the problem.
o Current method of solving the problem.
o Can the problem or part of the problem be more effectively solved by a
software solution?
o Computers are built to deal with algorithmic solutions, which are often
difficult or very time consuming for humans.
3
PPS Unit-I SKNSITS
Solution:
o Solution means the instructions listed during problem solving – the instructions
that must be followed to produce the best results.
o The result may be: More efficient, faster, more understandable or reusable.
Results:
o The result is outcome or the completed computer assisted answer.
o May take any form: Printout, updated files, output to monitor speakers, etc.
Program:
o Program is the set of instructions that make up the solution after they have been
coded into a particular computer language.
4
PPS Unit-I SKNSITS
5
PPS Unit-I SKNSITS
Divides a problem into smaller units and then Starts from solving small modules and
solve it. adding them up together.
Structured programming languages such as C use OOP languages like C++ and Java,
top-down approach. etc. uses bottom-up mechanism.
6
PPS Unit-I SKNSITS
7
PPS Unit-I SKNSITS
• Requirement Analysis: In this phase, the user’s expectations are gathered to know
why the software has to be built. The gathered requirements are analyzed to decide
scope of software. The last activity in this phase includes documenting every
identified requirement of the users in order to avoid any doubts regarding
functionality of software. The functionality, capability, performance and
availability of hardware and software components are all analyzed in this phase.
• Implementation: In this phase, the designed algorithms are converted into program
code using any of the high level languages. The particular choice of language will
depend on the type of program, such as whether it is system or application program.
This phase is also called as construction phase as the code of the software is
generated in this phase. While constructing the code, the development team checks
whether the software is compatible with available hardware that are mentioned in
requirement specification document.
• Testing: In this phase all modules are tested together to ensure that the overall
system works well as a whole product. In this phase the software is tested using a
large number of varied inputs, also known as test data, to ensure the software is
working as expected by user’s requirements.
• Software development, training and support: After the code is tested and the
software or the program has been approved by the users, it is installed or deployed
in the production environment. In this phase it becomes very crucial to have
training classes for users of software.
8
PPS Unit-I SKNSITS
• Maintenance: Maintenance and enhancement are ongoing activities that are done
to cope with newly discovered problems or new requirements. Such activities may
take a long time to complete as the requirement may call for the addition of new
code that does not fit original design or an extra piece of code, required to fix an
unforeseen problem.
2
1.3 History and Future of Python, Applications of Python
• Python is a general purpose interpreted interactive object oriented and high level
programming language.
• It was first introduced in 1991 by Guido van Rossum, a Dutch computer
programmer.
• The language places strong emphasis on code reliability and simplicity so that the
programmers can develop applications rapidly
• Python is multi-paradigm programming language, which allows user to code in
several different programming styles.
• Python supports cross platform development and is available through open
source. Python is widely used for scripting in Game menu applications effectively
History of Python:
Future of Python:
• Python’s userbase is vast and growing – it’s not going away any time soon.
• Utilized by the likes of Nokia, Google, and even NASA for it’s easy syntax, it looks to
have a bright future ahead of it supported by a huge community of OS developers.
• Its support of multiple programming paradigms, including object-oriented Python
programming, functional Python programming, and parallel programming models
makes it a highly adaptive choice – and its uptake keeps growing.
3
Applications of Python
• Web Development
• Data Science and Analytics
• Artificial Intelligence (AI) and Machine Learning (ML)
• Game Development
• Mobile Application Development
• And many more
1. Monolithic Programming
2. Procedural Programming
3. Structured Programming
• Programs written using monolithic programming languages such as assembly language consist of global
data and sequential code.
• The global data can be accessed and modified from any part of the program.
• A sequential code is one in which all instructions are executed in the specified sequence.
• In order to change the sequence of instructions, jump statements or ‘goto’ statements are used.
4
• Structure of a monolithic program:
Advantages:
Monolithic programming language is used only for very small and simple
applications.
Monolithic programming language is used only for applications where
reusability is not a major concern.
Disadvantages:
Monolithic programs have just one program module as monolithic
programming languages do not support the concept of subroutines.
As it is containing just one program module, all the actions required
completing particular task are embedded within same application itself. This
makes the size of program large.
It is difficult to debug and maintain monolithic programs.
5
(ii) Procedural Programming Paradigm:
6
(iii) Structured Programming Paradigm:
Structured programming is also known as modular programming.
By using structured programming paradigm, programs are designed to
implement a logical structure on the program.
Due to this, program becomes more efficient and easier to understand.
Structured programming is used in large programs that require a large
development team to develop different parts of the same program.
Structured programming employs a top-down approach in which the overall
program structure is broken down into separate modules.
Due to this top-down approach, the code is loaded into memory more
efficiently and also can be reused in other programs.
Modules are coded separately and once a module is written and tested
individually, it is then integrated with other modules to form the overall
program structure.
Structured programming is based on modularization. Modularization groups
related statements together into modules.
Modularization makes programming easier to write, debug and understand.
7
PPS Unit-I SKNSITS
Advantages:
o Structured programming is used to write correct programs that are easy
to understand and change.
o Structured programming allows users to look at the big picture
first and then focus on details later by using modules.
o With modules, many programmers can work on a single, large
program, with each working on a different module.
o A structured program takes less time to be written than other programs.
o Also modules or procedures written for one can be reused in
program other programs as well.
o Each module performs a specific
task. Each module has its own
local data.
o A structured program is easy to change as well as understand because
o every procedure has meaningful names and has clear documentation
to identify the task performed by it.
o A structured program is easy to debug because each procedure is
specialized to perform just one task and every procedure can be
checked individually for the presence of any error.
o Structured programming gives more emphasis on code and the least
importance is given to the data.
Disadvantages:
8
(iv) Object-oriented Programming (OOP) Paradigm:
Object-oriented programming paradigm treats data as a critical element in the
program development.
In this paradigm, all relevant data and tasks are grouped together in entities known
as objects.
Object-oriented programming is task based as it considers operations.
Object-oriented programming is data-based as these operations are grouped with
relevant data in objects.
Every object contains some data and the operations, methods, or functions that
operate on that data.
Programs that need the object will access the object’s methods through a specific
interface. The interface specifies how to send a message to the object, that is, a
request for a certain operation to be performed.
9
PPS Unit-I SKNSITS
Advantages:
OOP is used for simulating real world problems on computers because the
real world is made up of objects.
Programs written using OOP are data centered.
Programs are divided in terms of objects and not procedures.
Functions that operate on data are tied together with the data.
Data is hidden and not accessible by external functions.
New data and functions can be easily added as and when required.
It follows a bottom-up approach for problem solving.
Disadvantages:
o It requires more data protection.
o Inability to work with existing systems.
o Larger program size.
o Not suitable for all types of problems-for smaller problems it is in general not
suitable.
10