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 and define this number_guessing_game

2:

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

3:

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

4:

These code are basically setting up the place for user to type in their guesses for the game and as they typed an answer, it will count as an attempt

5:

These codes are basically giving out hints when the user’s guess is lower or higher than the actual number

6:

These are the codes that calculates the attempts and show the user that they got 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

Commentation

In this project I do beleive that my code is fairly clear even though it is only a simple number guessing game , this project actually helps me learn the basics of coding like the variables, definition statements and how to make the system show words. Moreover, it is also significant as a prerequisite for future projects that will be involving coding part in it

____________________________________________

The Complete AI Interaction

AI Interactions

Comments

4 Responses 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?

    1. mcrompton Avatar
      mcrompton

      Hi Lawrence. So you addressed one of the issues that I asked about. You now have defined a function and called it. You haven’t commented any of your code or fixed the flowchart. You also haven’t included the complete transcript of your AI interaction as far as I can tell.

      1. mcrompton Avatar
        mcrompton

        Getting closer, Lawrence. Only thing left is to actually comment your code. This is when you write explanations of what you are doing directly in the code. They can be separate lines or at the end of a line of code. For example you could write

        user_age = 25 # Stores the age of the user in years

        1. mcrompton Avatar
          mcrompton

          Thank you, Lawrence!

Leave a Reply

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