I need this question written in Perl so I can run in perl 5 and let me select an
ID: 3887129 • Letter: I
Question
I need this question written in Perl so I can run in perl 5 and let me select an answer
--------------------- please type answer-----------
Set bottom (denominator) to 0
If two or more different functions then equal equation with same exponent limit that are same
A. Find the limit
B Find values of x at which the function is discontinuous <---Correct
C.Find the limit of the function as x approaches infinity
D.Find the horizontal asymptote
I need this question as a perl script. like question1.pl so I can run it in perl
Explanation / Answer
# Switch on warnings and stuff good programming practice.
use strict;
use warnings;
# This variable will hold the user reaponse
my $answer;
# Write question and options to the console.
print "If two or more different functions then equal equation with same";
print "exponent limit that are same? ";
print "1. Find the limit ";
print "2. Find values of x at which the function is discontinuous ";
print "3. Find the limit of the function as x approaches infinity ";
print "4. Find the horizontal asymptote ";
print "Type in your answer: ";
# Get data from the user using STDIN and then remove extra spaces around it
# using chomp.
chomp($answer = <STDIN>);
# Check if the user has entered 2. If yes say something good, else show right
# answer to user.
if ($answer == 2) {
print "Booyah!, you got it right! ";
} else {
print "Whoops that's wrong. The right answer is: ";
print "2. Find values of x at which the function is discontinuous ";
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.