Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task is to write an interactive Perl program. The program will display a welcome message and then repeatedly display a prompt to its user,

image text in transcribedimage text in transcribed

Your task is to write an interactive Perl program. The program will display a welcome message and then repeatedly display a prompt to its user, asking the user to either enter the letter q or Q to quit the program, or to enter c to continue. If the user enters a q or Qinstead of a c .the program should terminate. Error checking: If the user enters any other character when it is waiting for the 'Qr or the c it should ignore it and display the prompt again. It should keep doing this until the user enters a valid character (qr, 'c.) the user enters c, the program should run two functions once (we covered functions in class) Function one: The task of this function is to take two three dimensional coordinates as input values and find the distance between them. This function prompts the user for the x-coordinate of the first point, then the y-coordinate, then the z-coordinate, and then prompts three more times for the x, y, and z coordinates of the second point. Once it has these values, it computes the distance between the two points and outputs that distance on the screen with a short message such as The distance between the two points is The distance between the points (zi,y, zh) and (z2,v2.22) is given by the formula Perl has a function named sqrt that can be used for this purpose. Error checking: Make sure the user input for the coordinates are numbers and no other characters Your function should display an error message if the user input is incorrect Function two: The task of this function is to prompt the user for a codon sequence. A codon sequence will be made up of the following characters a. u, C, g. It will be 3 characters long. Your function should display the amino acid that corresponds to that sequence. Here is the table that shows that

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions

Question

=+management system of the MNE?

Answered: 1 week ago