-
list_name.remove [element_number]
into your code.
Q: How do I find out how many elements are in a list? A: Use the built-in function
-
len (list_name)
it returns the number of elements in a list.
Suggestion for microproject 2: the command
-
while n <= len (list_name) - 1
is a good way to tell your program when to stop checking elements of a list. this works because the last element of a list is element number len(list_name)-1.
It's really spooky and annoying if the word "None" appears in your program for what seems like no reason at all. The reason it's there is that you forgot to include the "return" command when defining a function. So the function has a definition but no output.
random.random() returns a random floating-point number between 0.0 and 1.0, not including the endpoints.
Q: How does Python represent TRUE and FALSE? A: I've put up a page: UsingBooleansInPython. (Ted)
