0% found this document useful (0 votes)
26 views25 pages

Module 1_Introduction to Problem Solving and Python Fundamentals_BACSE101_Dr. Ayub

The document outlines a course on Problem Solving Using Python, covering fundamentals such as problem analysis, test cases, algorithms, and data types. It includes examples of calculating gross pay and converting distances, as well as the importance of robust programming and boundary testing. Additionally, it introduces flowcharts, pseudocode, and expressions in Python, emphasizing built-in functions.

Uploaded by

aj6550912
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views25 pages

Module 1_Introduction to Problem Solving and Python Fundamentals_BACSE101_Dr. Ayub

The document outlines a course on Problem Solving Using Python, covering fundamentals such as problem analysis, test cases, algorithms, and data types. It includes examples of calculating gross pay and converting distances, as well as the importance of robust programming and boundary testing. Additionally, it introduces flowcharts, pseudocode, and expressions in Python, emphasizing built-in functions.

Uploaded by

aj6550912
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Problem Solving Using Python BACSE101

Module 1: Introduction to Problem


Solving and Python Fundamentals
(6 hour)

Dr. Ayub Ahmed Janvekar


[email protected]
Mobile No: 9916067856
CONTENTS
• Fundamentals of Problem Solving:
Problem Analysis Chart
• Robust and Boundary Test Cases
• Algorithm - Flowchart - Pseudocode
• Data Types: Numeric, Boolean and Strings
• Regular Expression-Operators-Expressions
• Built in Functions
Fundamentals of Problem Solving: Problem Analysis Chart (PAC)
In Simple way……………!!

1.The given data (input)


2.The required results (output)
3.The processing of problem (computing)
4.The maximum possible solution (alternatives)
Example - 1
Calculate the gross pay of an employee with help of hours and payrate.
Gross Pay = Hours x Pay Rate
Example - 2
Convert the distance in km to miles 1 mile = 1.609 km
Robust and Boundary Test Cases

Example
Term It is…! Goal
Problem
Entering a letter
Robust A strong Don't crash on
instead of a
Program program bad input
number
First/last
Boundary Testing limits Work properly at
element of a list
Case of input start/end/edges
or empty list
Algorithm - Flowchart - Pseudocode
Flowchart
It is a picture of the separate steps of a process in sequential order.
Example - 1
Example - 2
Find the Bigger
Number among Two
given Numbers (A and
B)
Pseudocode

• It is an informal language that helps programmers


develop algorithms.
• Its a structured English for describing algorithm.
• One of the popular representation of algorithm.
• Each instruction is written on a separate line.
Example - 1
Calculate the gross pay of an
employee.
The formula to be used:
Gross Pay = Hours x Pay Rate
Example - 2
Write a pseudocode to find the sum of two numbers
Example - 3
Write a pseudocode to find the area of circle.
Data Types: Numeric, Boolean and Strings
Regular Expression
Operators
Expressions
✓ A combination of operands and operators is called an Expression.
✓ The expression in Python produces some value or result after being
interpreted by the Python interpreter.
✓ An example of expression can be :

In this expression, the first 10 is added to the variable x. After the addition
is performed, the result is assigned to the variable x.
Built in Functions

You might also like