> Since I'm new to python and don't really know how to write programs yet, my
> first question would be what exactly is the main function, because we did a
> similar assignment before this one that included it, and I'm not sure what
> exactly it does.
When you write a program, you write a collect
I am a beginner at python programming and right now we have to write the text
to design a program that will make a histogram for Benford's law which says
that in a natural set of data 1 will appear more than 2 which will appear more
than 3 and so on. So given a set of data I want a list showing
Looks all good except for this:
while guess == the_number:
Since you break out at the end, an if statement would be a more logical
choice.
and also:
if tries == 4:
print("\nYou fail!")
input("\n\nPress the enter key to exit.")
break
you don't need to break because t
I answered another question that says "Modify the guess_number program so
that the program's code is in a function called main(). Don't forget to call
main() so you can play the game." It seems to be working fine, but I would
like to have a second opinion if there was a better way to put it togeth