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

Bluetooth security

Smartphones have become an integral part of our daily lives, be it as a source for business information or for pure personal use. One of the most popular technologies now avai

Implement the structure circular queue with array

Implement the necessary methods for adding, removing the element in succession and retrieving without removing the element in succession. If an operation is invalid, throw a

Summarize the main points in the test plan

Assignment: Creating a Test Plan - In the previous assignments, you were tasked to develop a Web-based student registration system. Senior management was pleased with your p

Define radial distance from node i as the length of distance

Define the star distance of node i as the total distance from node i to all the nodes in the network. We refer to a node q as a median of G if node q has as small a star dis

Describe an actuator that could accept an electrical input

Each of the variables listed in Problem 1.7 can be brought under feedback control. Describe an actuator that could accept an electrical input and be used to control the vari

A candle maker produces jar candles

1. A candle maker produces jar candles that have a label weight of 20.4 oz. Assume that the distribution of the weights of these candles is N (21.37,0.16). Let X denote the we

Discussion of the characteristics of iot

CBCT2203 - BASIC CONCEPTS OF IT - In addition, discuss also how technologists think the world of IoT will change the university environment today. Justify your answers - Disc

Yielded additional valuable information

What were the most compelling topics learned in this course? How did participating in discussions help your understanding of the subject matter? Is anything still unclear tha

Reviews

Write a Review

 
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