Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Need Help with Perl Code

by freedomxcruiser
on Sep 23, 2017 at 23:24 UTC ( #1199972=perlquestion: print w/replies, xml ) Need Help??

freedomxcruiser has asked for the wisdom of the Perl Monks concerning the following question:

here's the question. If any one could help me out that would be great.

2. Assignment 7 – The Currency Converter in Chapter 2, change the currency conversion program so that it asks for an exchange rate and three prices to convert.

Begin this exercise with the starter file in the Assignment zip folder.

Downloading Perl: Be sure to DOWNLOAD the latest version of PERL for your Operating System from the following link: https://www.perl.org/get.html Let your instructor know if you have any questions about installation. The file should be installed on the C: drive to a folder called Perl64 (this folder will be created automatically.)

 Requirements
 
Points
 

Store the Variables
 
35

 

Return the Results
 
35
 

Ensure Results Are Accurate to Two Decimal Places
 
30
 

TOTAL POINTS 
 
100

I need the code created and it needs to store the variables, return the results, and ensure results are accurate to two decimal places. Thanks for all the help!

Lindsay

Replies are listed 'Best First'.
Re: Need Help with Perl Code
by ww (Archbishop) on Sep 23, 2017 at 23:45 UTC

    You must have PM confused with "The Lazy Students' Plagarism Sources."

    Good of you to state you question in a way that makes it utterly clear that you're asking us to do your homework.

    Good... that we don't do that. You'll learn little or nothing if we do it for you.

    But

    we will help you if:
    • Your show some effort; ie, post your own code that begins to attack the problem. Be sure to include output and/or any errors or warnings.
    • Explain why the result is unsatisfactory... and
    • Ask for help on a specific problem. That, we'll be glad to steer you in the right direction.

    (You may also want to read such site-FAQs as On asking for help, How do I post a question effectively? and Writeup Formatting Tips.)


    Yet another gimmé request!
    Sorry, we expect SOPW to seek wisdom, not to ask us to do so for them.

Re: Need Help with Perl Code
by davido (Cardinal) on Sep 24, 2017 at 00:24 UTC

    For what purpose are you taking this course?


    Dave

Re: Need Help with Perl Code
by hippo (Chancellor) on Sep 24, 2017 at 09:00 UTC
Re: Need Help with Perl Code
by karlgoethebier (Abbot) on Sep 24, 2017 at 09:34 UTC
    "...The Currency Converter in Chapter 2..."

    May be this is from Beginning Perl by James Lee?

    If so you find some sources here.

    But keep in mind what a wise prof told me many years ago: "Sure, you can cheat - if you really can explain the solution..."

    Do yourself a favor and find your own solution.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Re: Need Help with Perl Code
by Anonymous Monk on Sep 24, 2017 at 07:29 UTC
    On Windows
    perl -e "printf \"%.2f\n\",$ARGV[0]+0.005"
    Stored as $ARGV[0]; returned with two decimal place accuracy (with roundup) via printf.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1199972]
Approved by beech
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2020-10-28 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (260 votes). Check out past polls.

    Notices?