Representing the two highest numbers

Assignment Help Basic Computer Science
Reference no: EM132184049

Define a function twoMaxs(..) which receives a list (lst) with at least 2 elements, containing not repeated positive integer numbers and returns a string representing the two highest numbers in the list (and respective positions in the list) as follows.

twoMaxs([10,50,20,30,80,20]) should return "80(4)--50(1)--" because 80 is the first maximum (in position 4) and 50 is the second maximum in position 1

Notice that the largest maximum is placed first.

As an example, the following code fragment:

res = twoMaxs([10,50,20,30,80,20])

print(res)

should produce the output:

80(4)--50(1)--

Language- python

Reference no: EM132184049

Questions Cloud

Three page on organization learning disabilities : Can someone please give me a three page on organization learning disabilities?
Difficult to speak about in public : What informative speech topics are too difficult to speak about in public? Why?
Describe the jobs prior to the technological advances : Describe the jobs prior to the technological advances, List the new skills that you feel are relevant for person-focused pay programs.
Analysis of market structure and relating pricing strategies : Develop a paper detailing an analysis of market structures and relating pricing strategies that are suitable for each of these structures.
Representing the two highest numbers : Define a function twoMaxs(..) which receives a list (lst) with at least 2 elements, containing not repeated positive integer numbers and returns a string
Identify and discuss at least two of the case studys finding : Identify and discuss at least two of the case study's findings and recommendations and evaluate its strengths and weaknesses.
What quoted yield to maturity on a semiannual coupon bond : What quoted yield to maturity on a semiannual coupon bond would make you indifferent between that bond and the quarterly coupon bond described above
Second number the number of times : Define a function countALLlist(..) which receives a list of strings (where each string contains only digits) and returns a list with 10 values.
Transmission control protocol : What are the differences between Transmission Control Protocol and User Datagram Protocol? Please, also why would you use one over the other?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Why must outcomes and measurement metric

Why must outcomes and measurement metric be identified and agreed upon?

  Help me understand automobile class

Help me understand final program that meets the requirements outlined below.

  Is given type of good normally provided by private industry

Broadcast television and broadcast radio send out signals that can be received by an infinite number of receivers without reducing the quality of the reception.

  List four operating systems used on personal computers

List four operating systems used on personal computers, two operating systems used on servers, and four operating systems used on handheld devices. List advantages and disadvantages of the three most popular personal computer operating systems.

  Abstract and introduction

Need paper done with 8-10 pages not including cover page or reference. Please include abstract and introduction, that's already two pages out of your 8-10 pages. Please be original but if you do use other work please paraphrase.

  Write a transition table for the nonminimal state table

Write corresponding excitation equations for D flip-flops, assuming a minimalcost disposition of the unused state 111 . Compare the cost of your equations with the minimal-cost equations for the minimal state table presented in the text.

  Hardware component of a computer

Which of the following hardware component of a computer can also be called as engine?The sequence of phases, a software goes through from the concept to decommissioning, is called as.

  Electronic health record

Write a paper on Electronic Health Record (EHR) Research and Summary.

  Exchange-production-competition-coordination

As noted in Chapter 14 of Exchange & Production: Competition, Coordination, & Control, 3rd Edition, Armen Alchian & William R. Allen

  Create inadvertent control mechanisms

Strong cultures can have powerful effects on employee behavior. How does this create inadvertent control mechanisms? That is, are strong cultures an ethical way to control behavior? In what ways do rules and regulations help reduce unethical behav..

  Design of an on-line algorithm to minimize the competitive

The merit of an algorithm is the cost per day of skis, and we must try to minimize this cost.

  Report the number of patients

The following charts report the number of patients treated in each of the three locations last month.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd