Write a script which will accept 2 numbers and calculate for their difference (NOTE: difference is...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a script which will accept 2 numbers and calculate for their difference (NOTE: difference is the result of subtraction). If the difference is negative, display the message "The difference of the entered numbers is negative". Otherwise, ask the user to enter a character, filename and directory name. Based on the entered character, use a case structure to implement the tasks on the given table below. (6 Marks) Character Tasks H Display the first 8 lines of the entered file R Delete the entered file L Display a list of the files and directories under the entered directory C Create a copy of the entered file under the entered directory. default Display the message "Unrecognized Input" Write a script which will accept 2 numbers and calculate for their difference (NOTE: difference is the result of subtraction). If the difference is negative, display the message "The difference of the entered numbers is negative". Otherwise, ask the user to enter a character, filename and directory name. Based on the entered character, use a case structure to implement the tasks on the given table below. (6 Marks) Character Tasks H Display the first 8 lines of the entered file R Delete the entered file L Display a list of the files and directories under the entered directory C Create a copy of the entered file under the entered directory. default Display the message "Unrecognized Input"
Expert Answer:
Answer rating: 100% (QA)
Accepting two numbers from the user read p Enter the first number num1 read p Enter the second number num2 This block prompts the user to enter two numbers and stores them in the variables num1 and nu... View the full answer
Related Book For
Cost Accounting A Managerial Emphasis
ISBN: 978-0133392883
6th Canadian edition
Authors: Horngren, Srikant Datar, George Foster, Madhav Rajan, Christ
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
The figure shows a rotating wheel with radius 40 cm and a connecting rod AP with length 1.2 m. The pin P slides back and forth along the -axis as the wheel rotates counterclockwise at a rate of 360...
-
Mrs. Orlando has been noticing flashes of light and tiny specks in her right visual field. When she begins to see a "veil" floating before her right eye, she makes an appointment to see the eye...
-
An 80-kg man climbs up a 6-m high flight of stairs. What is the increase in gravitational potential energy?
-
A magnet lies on a table. You place a second magnet near the first one so that the two repel each other. Identify all the forces exerted on the first magnet.
-
Prepare in proper form the journal entries (budgetary and actual) to record the following transactions and events in the General Ledger, Revenues Ledger, and Expenditures Ledger of a Special Revenue...
-
Ahmed, a foreign qualified accountant, has recently returned to Pakistan and has joined a newly incorporated company Radium Limited (RL), a subsidiary of a listed company. Ahmed has been entrusted...
-
An automated car wash called Jet Express outside a large Texas city on the beltway is deciding whether to build and install one dedicated vehicle wash line or have two parallel wash lines. There are...
-
Write a paper on Quality Assurance is not expensive to implement
-
Two binary trees are isomorphic if only their key values differ (they have the same shape). Implement a linear-time static method isomorphic() that takes two tree references as arguments and returns...
-
Water's coefficient of expansion varies with temperature. For water at \(2^{\circ} \mathrm{C}\), an increase in temperature of \(1^{\circ} \mathrm{C}\) would cause the volume to A. Increase. B. Stay...
-
A jellyfish can propel Deflection \((\mathrm{cm})\) itself with jets of water pushed out of its bell, a flexible structure on top of its body. The elastic bell and the water it contains function as a...
-
Perhaps the most spectacular technological advance in recent history has been the development and growth of computing and the tools and applications that have come with it. Almost all of us use...
-
An economist wants to estimate mean annual income from the first year of work for college graduates who have had the profound wisdom to take a statistics course. How many such incomes must be found...
-
Given an educator for whom we dont know the initial test mark, what is the likelihood or probability of this educator obtaining an initial test mark as high as or higher than that of Boyd Grey? Boyd...
-
You are a U.S. investor who purchased British securities for 2,000 one year ago when the British pound cost U.S. $1.50. What is your total return (based on U.S. dollars) if the value of the...
-
Applewood Electronics, a division of Elgin Corporation, manufactures two large-screen television models: the Monarch, which has been produced since 2008 and sells for $1,700, and the Regal, a new...
-
Headsmart, a three-year-old company, has been producing and selling a single type of bicycle helmet. Headsmart uses standard costing. After reviewing the income statements for the first three years,...
-
Distinguish between a market-size variance and a market-share variance.
-
If, during a stride, the stretch causes her center of mass to lower by \(10 \mathrm{~mm}\), what is the stored energy? A. \(3.0 \mathrm{~J}\) B. \(6.0 \mathrm{~J}\) C. \(9.0 \mathrm{~J}\) D. \(12...
-
A \(1.00 \mathrm{~kg}\) block is attached to a horizontal spring with spring INT constant \(2500 \mathrm{~N} / \mathrm{m}\). The block is at rest on a frictionless surface. A \(10.0 \mathrm{~g}\)...
-
We can make a static measurement to deduce the spring constant to use in the model. If a \(61 \mathrm{~kg}\) woman stands on a low wall with her full weight on the ball of one foot and the heel free...
Study smarter with the SolutionInn App