1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tju [1.3M]
3 years ago
6

Codio python challenge (max.py)

Computers and Technology
2 answers:
dusya [7]3 years ago
4 0

I hope this helps:

https://stackoverflow.com/questions/3989016/how-to-find-all-positions-of-the-maximum-value-in-a-list

ryzh [129]3 years ago
4 0

Answer:

maximum=numbers.index(max(numbers))      

print("Maximum is at index {}".format(maximum))

<em>Input :</em>

4,5,2,6,2,1

<em>Output :</em>

Maximum is at index 3

Explanation:

In the above program, first max() function is used to find the maximum number of the list which is an inbuilt method of python.

Then, the output of above is passed as an argument to property of a list i.e. index() which gives the index of the parameter passed in this property. Here the maximum number's index is returned by this property.

This output is stored in variable maximum and after that the index of largest number in that list is printed in next line.

You might be interested in
C# The video game machine at your local arcade output coupons according to how well you play the game. You can redeem 10 coupons
slamgirl [31]

Answer:

#include<iostream>

using namespace std;

/* main is a function without a parameters which returns an int value*/

int main( )

{

/* declare int data type for numeric values initialize candyBar and gumBall */

int coupons, cabdyBr=10,gumall=3;

int candyBarAmount,gumBallAmount,remainder;

/* cout is used to show the message to user cin to read user input from keyboard and sets the value to coupon */

cout<<"Enter the number of coupons"\t";

cin>>coupons;

/* First check coupons with cabdyBar */

if (coupons >= candyBar)

{

candyBarAmount=coupons/candyBar;

remainder=coupons-(candyBarAmount*10);

}

else

{

candyBarAmount=0;

}

/* check remaining value with gumBall */

if (remainder<<candyBar && remainder>=gumBall)

{

gumBallAmount=remainder/gumball;

}

else

{

gumBallAmount=0;

}

/* show thw required output to the user */

cout<<"The number of Candy bars is "<< candyBarAmount <<endl;

cout<<"The number of gumballs is "<<gumballAmount <<endl;

/* The program ends and return 0 as the functions value */

return 0;

}

<u>OUTPUT</u>

Enter the number of coupons: 23

The number of candy bars = 2

The number of gumballs = 1

5 0
3 years ago
One cost of starting your own business is _____.
Harman [31]
One cost of staring your own business is the loan payments on the small business loan.

Revenue is clearly not an issue, and escrow just straight up doesnt make sense.
So our answer is clearly the fact that you have to pay back the loan you took out originally for your business!
4 0
3 years ago
LISTEN I NEED EVERY SINGLE BRAINLY USER TO RE POST THIS THERE IS A USER WHO JUST SAID THEY ARE GOING TO KILL THEMSELVES PLEASE C
Over [174]
WHAT IS THE NAME OF THE BRAINLY USER
7 0
3 years ago
Read 2 more answers
Which option can be used to access more settings than are available in the Backstage view?
Sedaia [141]

Answer:

Orientation settings

Explanation:

Orientation setting or general settings, we can find more options in Excel, we can make general and even advance setting with these options in the backstage view, the language and tabs can be changed in this section, the options are:

  • General
  • Formulas
  • Proofing
  • Save
  • Language
  • Advanced
  • Customize Ribbon
  • Quick access toolbar
  • Add-ins
  • Trust Center
6 0
4 years ago
Read 2 more answers
Differentiate the threat to a computer from electrical surges and spikes versus the threat from viruses
musickatia [10]
Electrical surges can overload a computer (or really any plugged in device) and the instant jump in power can fry the computer, ruining the hardware.  viruses are made to invade youre computer through software and some viruses have the goal of finding personal information or trying to get money.  this can be done by a virus locking down your computer until you send $_____ to an account or buy something.
8 0
4 years ago
Read 2 more answers
Other questions:
  • Which type of word processing programs enables us to include illustrations within the program?
    9·2 answers
  • Whats the 7 internal components found in a computer tower
    11·1 answer
  • You are a high school counselor with 9 students who applied for 3 different summer jobs: Job A, Job B, and Job C. Each of the su
    5·1 answer
  • You have created a new DHCP scope with address range 192.168.1.1 to 192.168.1.254. You have five servers configured with static
    8·1 answer
  • Cash cows are always in
    7·1 answer
  • If you insert a single row by using the Insert command on the shortcut menu, you can continue inserting rows by repeatedly press
    7·2 answers
  • True or false Encryption prevents hackers from hacking data?
    8·1 answer
  • For which of the following values of A and B will the expression A || B be true?
    15·1 answer
  • Which is an advantage of using a flat file instead of a relational database?
    5·1 answer
  • PLZZZZ HELPPP and please don’t send a link , Explain how the processing stage contributes to a computer creating an output.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!