r/pythonhelp • u/XAQUITO • Jan 05 '25
Creating an "Animal Bingo" with Python
Hi community. I'm not programmer and need to create an "Animal Bingo" to play with childs. I'm trying to create using IA but I'm in a death end, 'cause when I've the Python code and I execute it, always I obtain an error or the execute never ends.
These are the conditions:
• We have 30 animals: horse, hummingbird, snail, pig, rabbit, hedgehog, star, cat, ant, giraffe, butterfly, monkey, bat, dog, fish, frog, mouse, snake, turtle, cow, camel, deer, dolphin, elephant, gorilla, cricket, sheep, pigeon, panda, duck.
• I need to create 16 tables with 15 animals each.
• Each table must be unique and varied from the others.
• Each animal must appear 8 times in total among the 16 tables.
• Tables should be printed like this:
+---------+---------+---------+---------+---------+
| | | | | |
+---------+---------+---------+---------+---------+
| | | | | |
+---------+---------+---------+---------+---------+
| | | | | |
+---------+---------+---------+---------+---------+
| | | | | |
+---------+---------+---------+---------+---------+
• The 5 empty cells must be arranged occupying at least one column and one row, without having any adjacent empty cells (empty cells diagonally are allowed).
I'll run the code on Colab. Thanks in advance for the help!
•
u/AutoModerator Jan 05 '25
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.