B.Tech - CSE Semester - I: Topic For The Class: Unit 1: Title: Date & Time
B.Tech - CSE Semester - I: Topic For The Class: Unit 1: Title: Date & Time
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 1
Session Objective :
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 2
Topics to be Discussed GITAM
Deemed to be University
• Basic Terminologies related to Computer Programming.
• Introduction to Problem Solving
– What is a Problem?
– What is Problem Solving?
– Steps in Problem Solving
• PSP syllabus overview
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 3
BASIC TERMINOLOGIES RELATED TO COMPUTER PROGRAMMING GITAM
Deemed to be University
“Computer Science is a science of abstraction -creating the right model for a problem and devising the
appropriate mechanizable techniques to solve it.”
–A. Aho and J. Ullman
Computers are used for solving various day-to-day problems and thus problem solving is an essential skill that
a computer science student should try to develop.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 4
BASIC TERMINOLOGIES RELATED TO COMPUTER PROGRAMMING GITAM
Deemed to be University
COMPUTER
A computer is a fast electronic calculating device which accepts input information from
the user, processes it according to a program stored in its memory and produces output
information.
Since a computer can neither think nor make a decision on its own, it needs a program
which will convey what is to be done.
Computer Program
A program is a set of instructions following the rules of the chosen language. Without
programs, computers are useless. A program is like a recipe. It contains a list of
ingredients (called variables) and a list of directions (called statements) that tell the
computer what to do with the variables.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 5
BASIC TERMINOLOGIES RELATED TO COMPUTER
PROGRAMMING GITAM
Deemed to be University
SOFTWARE
Software is a set of programs, which is designed to perform a well-
defined function. A program is a sequence of instructions written to solve
a particular problem.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 6
BASIC TERMINOLOGIES RELATED TO COMPUTER PROGRAMMING
SYSTEM SOFTWARE
GITAM
Deemed to be University
• The system software is collection of programs designed to operate, control, and extend the processing
capabilities of the computer itself.
• Some examples of system software are Operating System, Compilers, Interpreter, Assemblers, etc.
APPLICATION SOFTWARE
• Application software products are designed to satisfy a particular need of a particular environment.
• Examples of Application software are following:
– Payroll Software
– Student Record Software
– Inventory Management Software
– Income Tax Software
– Railways Reservation Software
– Microsoft Office Suite Software
– Microsoft Word
– Microsoft Excel
– Microsoft Powerpoint
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 7
BASIC TERMINOLOGIES RELATED TO COMPUTER
PROGRAMMING GITAM
Deemed to be University
• PROGRAMMING LANGUAGES
Machine Level Language(0’s and 1’s)[1940’s]
Assembly Level Language(Mnemonics)[1950’s]
High Level Languages(English like language) [1960’s]
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 8
BASIC TERMINOLOGIES RELATED TO COMPUTER PROGRAMMING GITAM
Deemed to be University
Programming languages :
can be used to create computer programs. A programming language is a vocabulary and set of
grammatical rules (syntax) for instructing a computer to perform specific tasks.
Programming Approaches can be:
Top Down Design
Bottom up design
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 9
INTRODUCTION TO PROBLEM SOLVING
GITAM
Deemed to be University
What is a Problem????
• A State of difficulty that needs to be resolved
• PROBLEMS EXISTS WHERE GOALS NEED TO BE ATTAINED
AND THERE IS UNCERTAINITY ABOUT SOLUTION
Problem solving begins with the precise identification of the problem and ends with a complete working
solution in terms of a program or software.
ILL-Posed Problem: does not have a clear starting and end point. It is ambiguous(not clear).Example : How I
can be Happy and be prosperous?
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 11
INTRODUCTION TO PROBLEM SOLVING
GITAM
STEPS for PROBLEM SOLVING USING COMPUTERS: Example compute average of Deemed to be University
2 numbers
Identify the Problem(Problem Definition clear)
Analyze the problem
Develop An algorithm
Draw the Flowchart
Program Coding
Program Testing and Debugging
Documentation
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 12
INTRODUCTION TO PROBLEM SOLVING
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 13
INTRODUCTION TO PROBLEM SOLVING
GITAM
• Analyze the Problem: Why is the problem occurring? It is all about Deemed to be University
figuring out
how you will make use of the available data to compute an answer.
A complete and consistent specification(precise and unambiguous)
constraints on inputs
desired properties of outputs
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 14
• Develop an Algorithm:
INTRODUCTION TO PROBLEM SOLVING
GITAM
Deemed to be University
– Algorithm is blueprint or a plan for computer program.
– It is a step by step procedure to solve a particular problem in a finite number of steps, irrespective of programming language.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 15
INTRODUCTION TO PROBLEM SOLVING
GITAM
• Draw the Flowchart: It is a pictorial or diagrammatic representation
Deemed to be University
of
the algorithm.
• Program Coding: converting the algorithm into a format for the
computer to understand. That is select a high level language(C+
+,Java,Python) and convert the algorithm to instructions that computer
understands.
• Program Testing and Debugging: Execute and find errors(compilation
errors, run time errors, logical errors).
• Documentation: for later debugging, testing, maintenance, redesign
purpose.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 16
INTRODUCTION TO PROBLEM SOLVING
GITAM
Deemed to be University
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 17
GITAM
19EID133: PROBLEM SOLVING AND PROGRAMMING WITH PYTHON
This course focuses on problem solving using visual programming and flowchart tools. Python being simple
and easy to learn syntax, it is used as an introductory coding platform to translate flow charts into programs.
The course introduces fundamental programming concepts. Python language is used to present concepts
including control structures, functions, data structures followed by important Python packages that will be
useful in data analysis.
• Course Objectives:
To introduce programming through Visual programming tool - Scratch
To teach problem solving through Flow charting tool - Raptor
To elucidate problem solving through python programming language
To introduce function-oriented programming paradigm through python
To train in development of solutions using modular concepts
To teach practical Pythonic solution patterns
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 18
19EID133: PROBLEM SOLVING AND PROGRAMMING WITH PYTHON
SYLLABUS L T P C
3 1 3 5.5
Unit I: Computational Thinking and Visual Programming Concepts 10 L+6P
GITAM
Deemed to be University
Introduction to computational thinking. Visual programming concepts. Scratch environment: sprites -- appearance and motion,
angles and directions, repetition and variation, changing costumes, adding background. Input/Output, variables and operators.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 20
ALGORITHM GITAM
Deemed to be University
KEY FEATURES OF AN ALGORITHM
Algorithms show the following three features:
• Sequence (also known as process)
• Decision (also known as selection)
• Repetition (also known as iteration or looping)
Developing Algorithms:
• Each algorithm enclosed between statements START and STOP.
• To accept data from user ,the INPUT or READ statements are to be used.
• To display any user message, PRINT statement will be used. Message will be enclosed with in
quotes.
• In expressions, arithmetic ,logical, relational operators can be used.
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 21
ALGORITHM GITAM
• Write the algorithm to find the sum of any two numbers. Deemed to be University
step 1 : START
step 3 : INPUT A , B
step 4 : CßA+B
step 5 : PRINT C
step 6 : STOP
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 22
FLOWCHART: Graphical representation of an algorithm
Flowchart Symbols: GITAM
Deemed to be University
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 23
RAPTOR-flowchart-based programming environment(Rapid Algorithmic Programming Tool for Ordered Reasoning)
GITAM
Deemed to be University
• To download Raptor:
https://raptor.martincarlisle.com/
Working environment of RAPTOR is divided into four regions:
Toolbar
Symbol Palette
Workspace: to create flowcharts
watch window
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 24
SCRATCH GITAM
Deemed to be University
• https://scratch.mit.edu/download
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 25
Main Components of Scratch:
SCRATCH
Deemed to be University
GITAM
• Sprite: is a graphic character that performs actions in a scratch project
Scratch provides a number of inbuilt sprites. The default sprite is the cat.
• Stage: It is the main working area where the sprite moves and performs actions as per the
given instructions. Here you can watch stories, play games and run scratch projects that you
have created.
It is divided into x-y coordinates. The value of both the coordinates are displayed at the
bottom right corner of the stage
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 26
Flash quiz GITAM
Deemed to be University
• https://forms.gle/Lmh9mttJkgi82rgV9
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 27
What is Python ?
INTRODUCTION TO PYTHON
Deemed to be University
GITAM
• Python is a high level, interpreted (Install python interpreter), general purpose ,dynamic
programming language that focuses on code readability.
• It was created by Guido van Rossum in 1991 and further developed by the Python Software
Foundation, even before java which was developed (in 1995).
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 28
Applications of Python
INTRODUCTION TO PYTHON GITAM
Deemed to be University
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 29
REFERENCES GITAM
Deemed to be University
1. Reema Thareja, Python Programming: Using Problem Solving Approach, Oxford University
Press.
2. https://ncert.nic.in/textbook/pdf/kecs104.pdf
3. https://scratch.mit.edu/
4. https://raptor.martincarlisle.com/
8/28/2020 Department of Computer Science and Engineering 19EID133 Problem Solving and Programming with Python 30
GITAM
Deemed to be University