Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Update random_fact selection method #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions responses/10_create-python-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ If Python is a new programming language to you, like always don't worry. You are

# Select a random fact from the fact_list and return it
# into a variable named random_fact so we can use it
def select_random_fact(fact_arr):
return fact_arr[random.randint(0, len(fact_list)+1)]

random_fact = select_random_fact(fact_list)
random_fact = random.choice(fact_list)

# Print the individual randomly returned cat-fact
print(random_fact)
Expand Down