1

# Write a program that creates a list of 20 integers (between 1 and 40) using a random number generator function. Write a function that returns the index (position) of the third largest element from the...

## Question

###### Write a program that creates a list of 20 integers (between 1 and 40) using a random number generator function. Write a function that returns the index (position) of the third largest element from the...

Write a program that creates a list of 20 integers (between 1 and 40) using a random number generator function. Write a function that returns the index (position) of the third largest element from the list of integers. If there are more than one third largest number, return the index of the first occurrence of that number.
Eg: Assume that your main function has created the following list of integers generated from the random number function.
[12, 30, 28, 4, 17, 21, 5, 3, 35, 33, 23, 25, 21, 14, 14, 33, 16, 38, 13, 29]
Expected output:
List of integers:
[12, 30, 28, 4, 17, 21, 5, 3, 35, 33, 23, 25, 21, 14, 14, 33, 16, 38, 13, 29]
Third largest number: 33
Index (position) of third largest number: 10

#### Similar Solved Questions

##### A survey about students government program at a school found that 120 students wanted an after school program and 240 students wanted durning school and 40 students wanted none, If a circle graph is made from this data, what would be the measure of the ce
a survey about students government program at a school found that 120 students wanted an after school program and 240 students wanted durning school and 40 students wanted none, If a circle graph is made from this data, what would be the measure of the central angle for the after school group...
##### Javan Co has the following related to Class 8​ assets: Beginning​ Balance: \$40,000 Javan disposes of...
Javan Co has the following related to Class 8​ assets: Beginning​ Balance: \$40,000 Javan disposes of all assets within the class during the​ year, for proceeds of disposition of ​\$20,000. If Javan Co has no additions for the​ year, and there are no assets remaining in t...
##### For the problem we answer as if the Current date was January 1, 2018 LIABILITIES owed...
For the problem we answer as if the Current date was January 1, 2018 LIABILITIES owed of \$ 60 All liabilities are community property debt. To whom Original Property Interes Current Paymen How Total # Date of Amount or Service t Rate Balancet often First Purchased (as of Amount paid Paymen Payment Ac...
##### 7. Silver ion forms a stable 1:1 complex with a chelating amine molecule. Calculate the silver...
7. Silver ion forms a stable 1:1 complex with a chelating amine molecule. Calculate the silver ion concentration at equilibrium when 25mL of 0.10 M silver nitrate is added to 50 mL of 0.15 Mamine. Given that Kf = 5.0 x 10'....
##### DriveTrain, Inc. instituted a new process in October 2020. During October, 10,600 units were started in...
DriveTrain, Inc. instituted a new process in October 2020. During October, 10,600 units were started in Department A. Of the units started, 8,150 were transferred to Department B, and 2,450 remained in Work-in-Process at October 31, 2020. The Work-in-Process at October 31, 2020, was 100% complete as...
##### OURCES CALCULATOR PULLSCREEN PRINTER V ON BACK The Blue Company issued \$330.000 of 7 bonds on...
OURCES CALCULATOR PULLSCREEN PRINTER V ON BACK The Blue Company issued \$330.000 of 7 bonds on January 1, 2017. The bonds are anuary 1 2022 w interest payable each and January 1. The bonds were sted at 101 Prepare the journal entries for (a) January 1 (1) July 1, and ) December 31. Assume The Company...
##### In 2016, Natural Selection, a nationwide computer dating service, had \$534 million of assets and \$217...
In 2016, Natural Selection, a nationwide computer dating service, had \$534 million of assets and \$217 million of liabilities. Earnings before interest and taxes were \$137 million, interest expense was \$30 million, the tax rate was 40 percent, principal repayment requirements were \$25.2 million, and ...
##### Why do we use a simplified model of supply and demand when studying basic economics?
Why do we use a simplified model of supply and demand when studying basic economics?...
##### 1. In a transformation experiment, E. coli uptake pRGLO plasmids that carry GFP gene. The transformed...
1. In a transformation experiment, E. coli uptake pRGLO plasmids that carry GFP gene. The transformed bacterial cells are grown on an ampicillin-treated agar plate. Which of the following is considered as a vector? GFP gene C E. coli cell c ampicillin-treated agar plate 0.5 points QUESTION 2 1. What...
##### A ) ( mean, proportion, standard deviance or variance ) B ) is n > 30...
a ) ( mean, proportion, standard deviance or variance ) B ) is n > 30 C ) determine the parameter to be tested D ) determine the test to be performed B ) Determine the parameter to be tested, and the test to be performed. Part: 0 / 6 Part 1 of 6 A simple random sample of size 13 has mean x = 9.4....
##### 24. (Correlation) A researcher wants to determine if there is a linear relationship between height and...
24. (Correlation) A researcher wants to determine if there is a linear relationship between height and weight. The following table represents the data collected. Display the data in a scatter plot on your calculator, draw a quick sketch below. Then find the linear regression and put the line of best...
##### For the following chemical reaction HClO4(aq)+ NaOH(aq) H2O(l) + NaClO4(aq) write the net ionic equation, including...
For the following chemical reaction HClO4(aq)+ NaOH(aq) H2O(l) + NaClO4(aq) write the net ionic equation, including the phases. Which of these ions are considered ''spectator ions'' for this reaction? Check all that apply. H+ Na+ ClO4- OH-...
##### Invest 1,000,000 Bank A : \$1=€1 Bank B: \$1.8=£1 Bank C: £1 =€1.5 How much can...
invest 1,000,000 Bank A : \$1=€1 Bank B: \$1.8=£1 Bank C: £1 =€1.5 How much can you make ?...
##### The coefficient of linear expansion for some common materials are listed in the table to the...
The coefficient of linear expansion for some common materials are listed in the table to the right. You would like to design an emergency overheating alarm using one of these materials. In your design, at room temperature (23.0degreeC), a 5.51 cm long cylinder of the material will sit with one end a...