Question: write a python code to get out put like this Welcome to the Animal Accumulator. Animals cost and generate income according to their name length

write a python code to get out put like this "Welcome to the Animal Accumulator.
Animals cost and generate income according to their name length (e.g., a Zebra costs 5).
Each day, animals generate income based on luck. Sometimes they escape.
You can buy new animals with the income your animals generates.
Would you like to load your animals from animals.txt (Y/n)? y
Loaded.
You start with these animals:
Fox, Hippo, What Will I Buy With All These 106 Income$? :),
After 0 days, you have 3 animals and your total income is 0.
(W)ait
(D)isplay animals
(A)dd new animal
(Q)uit
Choose: w
Today's lucky number is 31.
Sadly, your Fox has escaped.
Hippo earned 1, What Will I Buy With All These 106 Income$? :) earned 14,
After 1 days, you have 2 animals and your total income is 15.
(W)ait
(D)isplay animals
(A)dd new animal
(Q)uit
Choose: W
Today's lucky number is 18.
Sadly, your What Will I Buy With All These 106 Income$? :) has escaped.
Hippo earned 0,
After 2 days, you have 1 animals and your total income is 15.
(W)ait
(D)isplay animals
(A)dd new animal
(Q)uit
Choose: w
Today's lucky number is 32.
Sadly, your Hippo has escaped.
After 3 days, you have 0 animals and your total income is 15.
(W)ait
(D)isplay animals
(A)dd new animal
(Q)uit
Choose: d
No animals.
After 3 days, you have 0 animals and your total income is 15.
(W)ait
(D)isplay animals
(A)dd new animal
(Q)uit
Choose: q
You finished with no animals.
After 3 days, you have 0 animals and your total income is 15.
Would you like to save your animals to animals.txt (Y/n)? N
Thank you for playing the Animal Accumulator :) "

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!