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 accept 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:



The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 3.8 / 5. Vote count: 14

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: