Python代写 | Pycharm wxPython代写程序 | User Interface Implementation

Objectives

Overview

In the lecture this week we looked at user interface implementation. For this weeks workshop, we will develop a simple interface for a guessing game.

Task 1 – Setup wxPython

Use Annaconda or pycharm to install the wxpython library

> conda install wxpython

Or do it using the Anaconda Navigator or PyCharm Package manager.

You will need to do this each time you restart the lab

Open up your IDE, and attempt to: import wx and run it.

Task 2 – Guessing game

Develop a simple GUI for a guessing

The game should begin when the program is run by generating a random number between 1 and 100. It should provide a text field for the user to enter a guess, a button to submit their guess, and display “higher” or “lower” somewhere on the interface after each guess, as well as the number of guesses they have

When the user correctly guesses the number, the program should display a message box congratulating them, and then terminate with self.Close(True)