From Confusion to Clarity 2

From the Silent Auction program, I Learned

  • Since I am using Windows, I clear the screen using the os.system ('cls') method. This command is specific to the Windows command prompt. However, on Mac or Linux systems, we need to use os.system('clear') because 'clear' command used in Unix-based terminals to clear the screen.

  • I chose to use a dictionary to store the bids because a dictionary allows us to store data in a key-value pair format. This is ideal for our program, where each participant's name (the key) is associated with their respective bid amount (the value). For example, {'abc' : 20000 , 'cde' : 3456 , 'efr' : 50000}

  • At first, I thought the program would run normally, but it didn’t clear the screen as expected. To make the screen-clearing functionality work in PyCharm, we need to modify the run configuration:

    • Go to Run > Edit Configurations.

    • Check the option "Emulate terminal in output console".

This setting is necessary because PyCharm’s default output console does not support certain terminal commands, like clearing the screen.