SlideShare a Scribd company logo
1 of 26
Python with AI – I
Flow Chart
What are flow charts
• A flow chart represents the algorithm using a diagram
• Creating a flow chart helps design the logic of the program
Example – Add two numbers given by a user
Example – Add two numbers given by a user
Start
Accept first
input: num1
Example – Add two numbers given by a user
Start
Accept first
input: num1
Accept second
input: num2
Example – Add two numbers given by a user
Start
Accept first
input: num1
Accept second
input: num2
Sum = num1 + num2
Example – Add two numbers given by a user
Start
Accept first
input: num1
Accept second
input: num2
Add = num1 + num2
Print Add
Stop
Example – Add two numbers given by a user
Start
Accept first
input: num1
Accept first
input: num2
Add = num1 + num2
Print Add
Stop
Example – Add two numbers given by a user
Start
Accept first
input: num1
Accept first
input: num2
Add = num1 + num2
Print Add
Stop
Basic flow chart symbols
Symbol Purpose Description
Flow line Indicated the flow from one block
to another
Start/Stop Represents the start and end of the
flow chart
Processing Arithmetic operations
Input/Output Input and output operations
Conditional Decision making block
Example – Print the maximum between two
numbers Start
Accept first
number: num1
Accept second
number: num2
as input
Print num1
Stop
If
num1>
num2
Print num2
True False
Example – Print the maximum between two
numbers Start
Accept first
number: num1
Accept second
number: num2
as input
Print num1
Stop
If
num1>
num2
Print num2
True False
Verify that the flow chart
works correctly for a few
examples
num1 = 10, num2 = 20
num1 = 15, num2 = 5
Exercise: Create a flow chart for this problem
• Given 3 numbers, a, b, c, find the maximum value
Exercise: Create a flow chart for this problem
• Given 3 numbers, a, b, c, find the maximum value
• Verify that what your flow chart works correctly
• Examples:
• a = 10, b = 20, c = 30
• a = 15, b = 30, c = 5
• a = 40, b =80, c = 120
Exercise: Create code
Start
Declare 3
numbers: a, b, c
If a > b
Print b
FalseTrue
If a > c
Print a
If b > cPrint c
Stop
True True
False False
Flow Chart: Loops
• Ask user to enter a number
• Print all even numbers between 0 and the number user entered
Flow Chart: Loops
Start
User inputs a number num1
Flow Chart: Loops
Start
User inputs a number num1
a = 1
If a <=
num1
True Is a
divisible by
2?
Stop
True
Print a
False
Flow Chart: Loops
Start
User inputs a number num1
a = 1
If a <=
num1
True Is a
divisible by
2?
Stop
True
Print a
a = a+1
False
HW discussion
• Find if a number is prime, how would a flow chart for this look?
HW discussion
Start
User inputs a number num1
What is a prime number?
HW discussion
Start
User inputs a number num1
a = 1
If a <
num1
True Is num1
divisible by
a?
Print it’s a
prime number
Stop
True
Print it’s not a
prime number
a = a+1
How do you check if a string is a palindrome?
• How do you access different characters of a string?
How do you check if a string is a palindrome?
• How do you access different characters of a string?
• How do you access several characters in a string as a block?
How do you check if a string is a palindrome?
• How do you access different characters of a string?
• How do you access several characters in a string as a block?
• Please create a flowchart of how you would check if something is a
palindrome logically. Then use the above two operations to code the
logic.
Lets try it!
http://aiclub.world

More Related Content

What's hot

Introduction to programming (week 1)
Introduction to programming (week 1)Introduction to programming (week 1)
Introduction to programming (week 1)Don Bosco School Manila
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplicationTaqwa It Center
 
Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexityAbirami A
 
Adder
AdderAdder
AdderMdRiyad5
 
Write a complete C++ program that does the following: 1. The program will c...
Write a complete C++ program that does the following:   1. The program will c...Write a complete C++ program that does the following:   1. The program will c...
Write a complete C++ program that does the following: 1. The program will c...licservernoida
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithmvishal choudhary
 
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and SubtractorSmit Shah
 
c++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfc++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfayush616992
 
Adder substracter
Adder substracterAdder substracter
Adder substracterWanNurdiana
 
Programming Problem 3
Programming Problem 3Programming Problem 3
Programming Problem 3Dwight Sabio
 
Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)SetuMaheshwari1
 
Code Optimization in MIPS
Code Optimization in MIPSCode Optimization in MIPS
Code Optimization in MIPSAhsan Javed
 
Half Adder and Full Adder
Half Adder and Full AdderHalf Adder and Full Adder
Half Adder and Full AdderShayshab Azad
 
Integer represention
Integer representionInteger represention
Integer representionSaif Ullah
 
Lecture 1 python arithmetic (ewurc)
Lecture 1 python arithmetic (ewurc)Lecture 1 python arithmetic (ewurc)
Lecture 1 python arithmetic (ewurc)Al-Mamun Riyadh (Mun)
 
Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |
Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |
Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |JalpaMaheshwari1
 
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)ISMT College
 
Armstrong calculator
Armstrong calculatorArmstrong calculator
Armstrong calculatorJayantBhatt6
 

What's hot (20)

Introduction to programming (week 1)
Introduction to programming (week 1)Introduction to programming (week 1)
Introduction to programming (week 1)
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplication
 
Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
 
Adder
AdderAdder
Adder
 
Write a complete C++ program that does the following: 1. The program will c...
Write a complete C++ program that does the following:   1. The program will c...Write a complete C++ program that does the following:   1. The program will c...
Write a complete C++ program that does the following: 1. The program will c...
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and Subtractor
 
c++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfc++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdf
 
Adder substracter
Adder substracterAdder substracter
Adder substracter
 
Programming Problem 3
Programming Problem 3Programming Problem 3
Programming Problem 3
 
Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)Pointers lesson 3 (data types and pointer arithmetics)
Pointers lesson 3 (data types and pointer arithmetics)
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Code Optimization in MIPS
Code Optimization in MIPSCode Optimization in MIPS
Code Optimization in MIPS
 
Half Adder and Full Adder
Half Adder and Full AdderHalf Adder and Full Adder
Half Adder and Full Adder
 
Integer represention
Integer representionInteger represention
Integer represention
 
Lecture 1 python arithmetic (ewurc)
Lecture 1 python arithmetic (ewurc)Lecture 1 python arithmetic (ewurc)
Lecture 1 python arithmetic (ewurc)
 
Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |
Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |
Introduction to Half and Full Adder Circuit - Part 01 | Digital Logic Design |
 
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
 
Armstrong calculator
Armstrong calculatorArmstrong calculator
Armstrong calculator
 
Lab 1
Lab 1Lab 1
Lab 1
 

Similar to Pa1 wednesday flow_chart

Pa1 flow chart
Pa1 flow chartPa1 flow chart
Pa1 flow chartaiclub_slides
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithmDHANIK VIKRANT
 
Flow chart and algorithm
Flow chart and algorithmFlow chart and algorithm
Flow chart and algorithmAyushi gupta
 
Best Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesBest Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesTech
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSKate Campbell
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartMohammad Imam Hossain
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptxShimoFcis
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxMattFlordeliza1
 
Calculator Manipulation.pptx
Calculator Manipulation.pptxCalculator Manipulation.pptx
Calculator Manipulation.pptxfroilandoblon1
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMRc Os
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.pptzorogoh2
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniquesfika sweety
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_iElsayed Hemayed
 
Algorithms with-java-1.0
Algorithms with-java-1.0Algorithms with-java-1.0
Algorithms with-java-1.0BG Java EE Course
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptSuryaKumarSahani
 
Flowcharts and pseudocodes
Flowcharts and pseudocodesFlowcharts and pseudocodes
Flowcharts and pseudocodesDr Piyush Charan
 

Similar to Pa1 wednesday flow_chart (20)

Pa1 flow chart
Pa1 flow chartPa1 flow chart
Pa1 flow chart
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Flow chart and algorithm
Flow chart and algorithmFlow chart and algorithm
Flow chart and algorithm
 
Best Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing TechniquesBest Techniques To Design Programs - Program Designing Techniques
Best Techniques To Design Programs - Program Designing Techniques
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and Flowchart
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptx
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptx
 
Calculator Manipulation.pptx
Calculator Manipulation.pptxCalculator Manipulation.pptx
Calculator Manipulation.pptx
 
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHMCLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
CLASS VIII COMPUTERS FLOW CHART AND ALGORITHM
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_i
 
Lecture 7.pptx
Lecture 7.pptxLecture 7.pptx
Lecture 7.pptx
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
Algorithms with-java-1.0
Algorithms with-java-1.0Algorithms with-java-1.0
Algorithms with-java-1.0
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
Cp module 2
Cp module 2Cp module 2
Cp module 2
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) ppt
 
Flowcharts and pseudocodes
Flowcharts and pseudocodesFlowcharts and pseudocodes
Flowcharts and pseudocodes
 

More from aiclub_slides

Linear regression middleschool
Linear regression middleschoolLinear regression middleschool
Linear regression middleschoolaiclub_slides
 
Pa2 project template
Pa2 project templatePa2 project template
Pa2 project templateaiclub_slides
 
Knn intro advanced_middleschool
Knn intro advanced_middleschoolKnn intro advanced_middleschool
Knn intro advanced_middleschoolaiclub_slides
 
M1 regression metrics_middleschool
M1 regression metrics_middleschoolM1 regression metrics_middleschool
M1 regression metrics_middleschoolaiclub_slides
 
Pa1 json requests
Pa1 json requestsPa1 json requests
Pa1 json requestsaiclub_slides
 
Ai in real life face detection
Ai in real life   face detectionAi in real life   face detection
Ai in real life face detectionaiclub_slides
 
Res net high level intro
Res net high level introRes net high level intro
Res net high level introaiclub_slides
 
Neural networks and flattened images
Neural networks and flattened imagesNeural networks and flattened images
Neural networks and flattened imagesaiclub_slides
 
What is a_neural_network
What is a_neural_networkWhat is a_neural_network
What is a_neural_networkaiclub_slides
 
How neural networks learn part iii
How neural networks learn part iiiHow neural networks learn part iii
How neural networks learn part iiiaiclub_slides
 
Introduction to deep learning image classification
Introduction to deep learning   image classificationIntroduction to deep learning   image classification
Introduction to deep learning image classificationaiclub_slides
 
Accuracy middleschool
Accuracy middleschoolAccuracy middleschool
Accuracy middleschoolaiclub_slides
 
Introduction to classification_middleschool
Introduction to classification_middleschoolIntroduction to classification_middleschool
Introduction to classification_middleschoolaiclub_slides
 
Introduction to the cloud
Introduction to the cloudIntroduction to the cloud
Introduction to the cloudaiclub_slides
 
Basics of data
Basics of dataBasics of data
Basics of dataaiclub_slides
 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigatoraiclub_slides
 

More from aiclub_slides (20)

Linear regression middleschool
Linear regression middleschoolLinear regression middleschool
Linear regression middleschool
 
Pa2 project template
Pa2 project templatePa2 project template
Pa2 project template
 
Knn intro advanced_middleschool
Knn intro advanced_middleschoolKnn intro advanced_middleschool
Knn intro advanced_middleschool
 
M1 regression metrics_middleschool
M1 regression metrics_middleschoolM1 regression metrics_middleschool
M1 regression metrics_middleschool
 
Pa1 json requests
Pa1 json requestsPa1 json requests
Pa1 json requests
 
Mnist images
Mnist imagesMnist images
Mnist images
 
Mnist images
Mnist imagesMnist images
Mnist images
 
Ai in real life face detection
Ai in real life   face detectionAi in real life   face detection
Ai in real life face detection
 
Cnn
CnnCnn
Cnn
 
Res net high level intro
Res net high level introRes net high level intro
Res net high level intro
 
Neural networks and flattened images
Neural networks and flattened imagesNeural networks and flattened images
Neural networks and flattened images
 
What is a_neural_network
What is a_neural_networkWhat is a_neural_network
What is a_neural_network
 
How neural networks learn part iii
How neural networks learn part iiiHow neural networks learn part iii
How neural networks learn part iii
 
Introduction to deep learning image classification
Introduction to deep learning   image classificationIntroduction to deep learning   image classification
Introduction to deep learning image classification
 
Accuracy middleschool
Accuracy middleschoolAccuracy middleschool
Accuracy middleschool
 
Introduction to classification_middleschool
Introduction to classification_middleschoolIntroduction to classification_middleschool
Introduction to classification_middleschool
 
Introduction to the cloud
Introduction to the cloudIntroduction to the cloud
Introduction to the cloud
 
Basics of data
Basics of dataBasics of data
Basics of data
 
Ai basics
Ai basicsAi basics
Ai basics
 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigator
 

Recently uploaded

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

Pa1 wednesday flow_chart

  • 1. Python with AI – I Flow Chart
  • 2. What are flow charts • A flow chart represents the algorithm using a diagram • Creating a flow chart helps design the logic of the program
  • 3. Example – Add two numbers given by a user
  • 4. Example – Add two numbers given by a user Start Accept first input: num1
  • 5. Example – Add two numbers given by a user Start Accept first input: num1 Accept second input: num2
  • 6. Example – Add two numbers given by a user Start Accept first input: num1 Accept second input: num2 Sum = num1 + num2
  • 7. Example – Add two numbers given by a user Start Accept first input: num1 Accept second input: num2 Add = num1 + num2 Print Add Stop
  • 8. Example – Add two numbers given by a user Start Accept first input: num1 Accept first input: num2 Add = num1 + num2 Print Add Stop
  • 9. Example – Add two numbers given by a user Start Accept first input: num1 Accept first input: num2 Add = num1 + num2 Print Add Stop
  • 10. Basic flow chart symbols Symbol Purpose Description Flow line Indicated the flow from one block to another Start/Stop Represents the start and end of the flow chart Processing Arithmetic operations Input/Output Input and output operations Conditional Decision making block
  • 11. Example – Print the maximum between two numbers Start Accept first number: num1 Accept second number: num2 as input Print num1 Stop If num1> num2 Print num2 True False
  • 12. Example – Print the maximum between two numbers Start Accept first number: num1 Accept second number: num2 as input Print num1 Stop If num1> num2 Print num2 True False Verify that the flow chart works correctly for a few examples num1 = 10, num2 = 20 num1 = 15, num2 = 5
  • 13. Exercise: Create a flow chart for this problem • Given 3 numbers, a, b, c, find the maximum value
  • 14. Exercise: Create a flow chart for this problem • Given 3 numbers, a, b, c, find the maximum value • Verify that what your flow chart works correctly • Examples: • a = 10, b = 20, c = 30 • a = 15, b = 30, c = 5 • a = 40, b =80, c = 120
  • 15. Exercise: Create code Start Declare 3 numbers: a, b, c If a > b Print b FalseTrue If a > c Print a If b > cPrint c Stop True True False False
  • 16. Flow Chart: Loops • Ask user to enter a number • Print all even numbers between 0 and the number user entered
  • 17. Flow Chart: Loops Start User inputs a number num1
  • 18. Flow Chart: Loops Start User inputs a number num1 a = 1 If a <= num1 True Is a divisible by 2? Stop True Print a False
  • 19. Flow Chart: Loops Start User inputs a number num1 a = 1 If a <= num1 True Is a divisible by 2? Stop True Print a a = a+1 False
  • 20. HW discussion • Find if a number is prime, how would a flow chart for this look?
  • 21. HW discussion Start User inputs a number num1 What is a prime number?
  • 22. HW discussion Start User inputs a number num1 a = 1 If a < num1 True Is num1 divisible by a? Print it’s a prime number Stop True Print it’s not a prime number a = a+1
  • 23. How do you check if a string is a palindrome? • How do you access different characters of a string?
  • 24. How do you check if a string is a palindrome? • How do you access different characters of a string? • How do you access several characters in a string as a block?
  • 25. How do you check if a string is a palindrome? • How do you access different characters of a string? • How do you access several characters in a string as a block? • Please create a flowchart of how you would check if something is a palindrome logically. Then use the above two operations to code the logic.