Number game blog post

1: As the project was announced, it actually made me quite struggle since I have nearly zero experience in Python so I have to go through how python code was made and the fundamentals.

I started with thinking of doing something sports related like a bouncing ball code. However, It came out that the background and the ball image is hard to be crafted together. From this, I got inspired to make a number guessing game.

____________________________________________

This is my Code for the project

“欢迎使用 Colab”的副本 – Colab

____________________________________________

This is the flow chart of the process

____________________________________________

These are the definitions of what each code does

1:

This sentence is mainly telling the system that we are about to code a thing that requires random generates

2:

This sentence means we are letting the system randomly pick a number to start the game

3:

These are basically the greeting sentences, and sets the attempts count

4:

The first one means that the game will run forever until we get the right answer, the second one is to ensure if I entered a non-number, we can do with it.

5:

These basically means to create a box for the player to write their guess and plus an attempt for each guess

6:

These are just codes that will give feedbacks if the player gets the wrong answer and also stop when the player guessed the correct answer

7:

This is basically the part of how the system should do if the player input a non-number thing

Function Definition

These are the parts pf Function, creating a reusable code that includes the whole game in it

____________________________________________

The AI Interaction

AI Interactions

Comments

One response to “Number game blog post”

  1. mcrompton Avatar
    mcrompton

    This is a good start Lawrence. You have a functional Python program and have clearly learned some good lessons about the basics. I like the inclusion of your AI transcript, although I have to wonder if this is incomplete. Was your conversation longer? If so, please include the entire transcript. The explanation of your code is fairly clear. Two of the requirements that you are missing are the commenting of your code and the definition and calling of a function. Can you please fix the flowchart, add the commenting and edit your code to include the function element and resubmit, please?

Leave a Reply

Your email address will not be published. Required fields are marked *