70.6k views
2 votes
The following are available functions for calculating basic descriptive statics in R, except ___________.

User Entrabiter
by
8.2k points

1 Answer

0 votes

Here's an example implementation of the program:

user _info = [ ]

fish _info = [ ]

while True:

name = input("Enter your name: ")

email = input("Enter your email: ")

phone = input("Enter your phone number: ")

user _info.append({"Name": name, "Email": email, "Phone": phone})

print("Fish Information Menu:")

print("1. Sheepshead")

print("2. Red Drum")

print("3. Any other fish")

fish _type = int(input("Choose a fish type: "))

fish _length = float(input("Enter the length of the fish: "))

if fish _type == 1:

if fish _length < 15:

action = "throw back"

elif fish _length >= 15 and fish _length <= 21:

action = "keep"

else:

action = "tag"

elif fish _type == 2:

if fish _length < 20:

action = "throw back"

elif fish _length >= 20 and fish_length <= 28:

action = "keep"

else:

action = "tag"

else:

if fish _length < 16:

action = "throw back"

else:

action = "keep"

fish _info.append({"Fish Type": fish_type, "Length": fish_ length,"Action":action})

choice = input("Do you want to enter more fish information? (yes/no): ")

if choice .lower() == "no":

break

print("\\ User Information:")

for user in user _info:

for key, value in user .items():

print(f"{key}: {value}")

print("\\ Fish Information:")

for fish in fish _info:

for key, value in fish .items():

print(f "{key}: {value}")

To implement the program, you can start by creating a list to store the user information and another list to store the fish information. Use a loop to allow the user to enter fish information multiple times. Within the loop, prompt the user to choose a fish type and enter the length of the fish. Based on the chosen fish type and length, determine the appropriate action using conditional statements.

Create a dictionary to map the fish types to their respective criteria. For each fish type, check the length against the criteria and assign the corresponding action. Add the user's information and fish information to their respective lists.

After the loop ends, display the user's information and iterate over the fish information list to display the details of each fish entry.

User Daiscog
by
8.0k points