Question: Make a program that begins with an array of Toads. You can initialize a list of 1 5 Toads using a command like: array _
Make a program that begins with an array of Toads. You can initialize a list of Toads using a command like: arrayofamphibians T We will use the T character to represent Toads. At every iteration of a loop, make one of the Toads turn into a Frog. Represent Frogs with the F character. Print the current state of your array and then print which Toad turned into a Frog. Your program should loop at least times, updating a random Toad to a Frog each time.
To utilize random number generation in Python, do the following:
import random
j random.randint
Your program will have similar output to what is shown in the photo below. For full points, don't simply do "printarrayofamphibians because then it will print with commas and brackets, which we don't want here. Figure out a way to print each character individually.
To make it so that your program prints multiple things in a line, you can use end
For example:
printHello end
printWorld
This program will print:
Hello World
in python
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
