Bidding Process – Flowchart

auction-bidFor this challenge we will consider the bidding process used within online auction websites such as eBay.

Our aim is to create a system that will accepts bids from the end-user, check if the bid being placed is greater than the current bid and if so, update the value of the current bid.

Here is the flowchart for our Bidding System: (Click on this flowchart to open in new window)

Making Predictions

Check the above flowchart to understand how this algorithm will work. Based on this flowchart can you answer the following questions?

What will be the first question asked to the end user?

How does this algorithm decide if a bid is a valid bid or not?

How does this algorithm decide when the bidding process ends?

What will be the last message displayed to the end-user?

Python Challenge

Your challenge is to use Python code to implement this algorithm.

Extension Task

Check the following two blog posts to see how this code could be improved further by adding validation routines when capturing user inputs. Use these techniques to make your bidding system more robust:

Share Button
Tagged with: