Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Looking for help writing this program in RUBY. Introduction The purpose of this assignment is to familiarize you with the writing Ruby scripts that make

Looking for help writing this program in RUBY.

image text in transcribed

image text in transcribed

image text in transcribed

Introduction The purpose of this assignment is to familiarize you with the writing Ruby scripts that make use of the decision structures and Boolean logic. Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of purchase after the discount. Program Input The program should prompt the user: "Enter the number of packages purchased: " Program Calculation The program will calculate the amount of purchase, the discount and the total amount. Program Output The program will display to the user the amount of purchase, the discount and the total amount. The program should not loop. After the calculation and displaying the output, the program should exit. Shown below is the expected output produced by the program: The program should display the "Welcome to Daly Software Sales" heading followed by a blank line. The program should next display the Thank you line with the number of software packages followed by a blank line The program should also display the amount of purchase, the discount amount, its percentage and the total amount. There should be a dashed line between the discount and the total amount. The discount percentage should be display as shown above. You should verify that each of the ranges produces the correct result (0%,10%,15%,20%, and 25%) Your output should look like the sample output, and everything should align correctly. fl_Assignment_5B.rb Where a is the students first letter of their first name and b is the first letter of their last name. The Ruby file is required to have a programmer header containing the following: Submit Instructions - Before submitting, Refer to the Python Programming Coding Standards document on Canvas. - Correct any spelling or grammar errors. - Submit file via Canvas's submission tool

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

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

Question Can a Roth IRA invest in stock of the IRA owners business?

Answered: 1 week ago