Python Forum
Need help and suggestions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help and suggestions
#4
I noticed few things:
1. rand_guess() function is not called at all
2. generator() function is called multiple times throghout the game, constantly changing the actual number (this shouldn't happen, it should be called once before each game and the result should be kept and used for comparison with the actual guesses)
3. generator() function has the upper limit of 10, the description of the game says that number up to 99 should be picked
4. number variable is never initialized
5. elif guess != generator() is never satisfied because previous conditions include ">" and "<"
6. generator() function is called before being initialized (you can just cut/paste definition of that function over the main "while guesses" loop
Reply


Messages In This Thread
Need help and suggestions - by jsoberano - May-06-2019, 12:17 AM
RE: Need help and suggestions - by Yoriz - May-06-2019, 12:23 AM
RE: Need help and suggestions - by nilamo - May-06-2019, 08:34 PM
RE: Need help and suggestions - by michalmonday - May-07-2019, 03:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Suggestions on my code YorgosTheProgramer 2 3,458 Mar-13-2017, 01:22 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020