subject

Create a scalar function called PriceOfGivenRank, which takes an input of integertype. PriceOfGivenRank will first sort products in the descending order of unit prices exactly like RankOfGivenPrice in Q3. Then, PriceOfGivenRank will find the unit price of product(s) whose rank equalsto the input integer and return the unit price. If the input integer does not match any rank in the sorted Products table, it returns -2. For example, because there are four products with a unit price of $18 and they are all ranked to be 40, PriceOfGivenRank(40) should return 18. Because no products is ranked to be 90,PriceOfGivenRank(90) returns -2.In addition to 'create function' statement, your script must also contain threestatements to test PriceOfGivenRank. The first test should display a return ofa valid price, the second should display a return of -0.99, and the last is a special test, which uses a valid output of RankOfGivenPrice that you completed in Q3 as its input and this test displays the output of PriceOfGivenRank.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
Me dangers of social media and the internetexplain what each means: 1) social media and phones have become an addiction.2) outside people have access to you all the time.3) cyberstalking4) cyberbullying5) catphishing6) viruses7) identity theft8) credit card fraud9) hacking10) money schemes
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
You know the right answer?
Create a scalar function called PriceOfGivenRank, which takes an input of integertype. PriceOfGivenR...
Questions
question
Mathematics, 23.10.2021 01:10
Questions on the website: 13722359