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 15 Toads using a command like: array_of_amphibians =['T']*15. 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 10 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(0,14)
Your program will have similar output to what is shown in the photo below. For full points, don't simply do "print(array_of_amphibians)". 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:
print("Hello ", end="")
print("World")
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 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 Programming Questions!