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
soldi70 [24.7K]
3 years ago
10

Write a function called find_max that takes in a single parameter called random_list, which should be a list. This function will

find the maximum (max) value of the input list, and return it. This function will assume the list is composed of only positive numbers. To find the max, within the function, use a variable called list_max that you initialize to value 0. Then use a for loop to loop through random_list. Inside the list, use a conditional to check if the current value is larger than list_max, and if so, re-assign list_max to store this new value. After the loop, return list_max, which should now store the maximum value from within the input list.
Computers and Technology
1 answer:
liberstina [14]3 years ago
7 0

Answer:

see explaination

Explanation:

python code

def find_max(random_list):

list_max=0

for num in random_list:

if num > list_max:

list_max=num

return list_max

print(find_max([1,45,12,11,23]))

You might be interested in
Write a c++ program that generates three random numbers. The first number should be between 0-30, the second number should be be
Rama09 [41]

Answer:

#include <stdlib.h>

#include <time.h>  

#include <iostream>

using namespace std;

int main() {

   srand(time(NULL));

   cout << rand() % 30 << endl;

   cout << rand() % 30 + 30 << endl;

   cout << rand() % 30 + 60 << endl;

}

Explanation:

rand() returns a pseudo-random integral number in the range between 0 and RAND_MAX. By applying the modulo operator, you map that to the desired range (30 in your case), then you add an offset.

8 0
3 years ago
Why is the term RAW image file generally used to describe a variety of file formats, which are sometimes known as digital raw ca
mihalych1998 [28]

Answer:

c. because RAW files are proprietary.

Explanation:

When scanners and digital cameras are used to capture images that are uncompressed or minimally processed image file, it is known as a RAW image file.

Generally, this file type are usually very large in size because of their lossless quality and does not have any alteration and as such have not been processed; thus, cannot be printed.

The term RAW image file is generally used to describe a variety of file formats, which are sometimes known as digital raw captures because RAW files are proprietary.

8 0
3 years ago
Lola's teacher asked her to create a web page for the school's FBLA chapter. Lola isn't sure where to begin. Which tool should s
yan [13]

Answer: i tried

Explanation:

4 0
3 years ago
Read 2 more answers
What's wrong with my program? Here is my code , if the user wants a 3rd card dealt they, have to select yes and the total will b
Mashcka [7]

Your issue is on line 19 in your if statement. In python, if you have more than one condition in an if statement, you have to explicitly mention it after the or.

Your if statement is

if again == "Y" or "y":

However, this will always return true because the second statement simply asks "y".

To correct this, simply change the if statement to:

if again == "Y" or again == "y":

This will correct your code.

Another thing to consider is to always convert a userinput (whenever possible) to one version, this can be accomplished in your code by converting "again" into one version by using the .lower function.

again = input("Would you like to draw a 3rd card? Y or N? ")

again = again.lower()

Hope this helps!

4 0
2 years ago
ENG103 DISCUSSION BOARD 6
amm1812
The proper citation for your course of study -computer related- is APA (American Psychological Association)  format. This citation format allows us to state the publication date, title , and authors in an organized and short fashion. All scholarly reports that are technology or psychology based, should be cited in APA format. 

<span>I know this because it is the format I use for all of my college courses which are all Computer/Technology related. </span>
3 0
3 years ago
Other questions:
  • Write a main function to do the following: A. Declare an array of 20 strings. B. Create an input file for the file "poem.dat". C
    12·1 answer
  • Which education level has the highest return on investment (ROI)? AHigh School Diploma BROI is equal for all of the above. CSeni
    6·1 answer
  • Sara works in the IT department for a large retail store. She has been testing a theory about why an error message keeps popping
    14·1 answer
  • Which of the following best meets the requirements of a strong password?
    5·2 answers
  • Create a new file that builds a shopping list from a user. There should be a input query that asks the user to list an item and
    11·1 answer
  • PLEASE FASTTTTT
    8·2 answers
  • You are a network administrator for a company that has two buildings. You are setting up a wireless network so users can maintai
    8·1 answer
  • PLEASE HELLPPPPP EVERYONE IS IGNORING THISSSSSSSSSS
    11·1 answer
  • Write a program to generate the following series 1, 3, 5, 7, 9, 11.................. 10th​
    10·1 answer
  • Mencione 2ejemplos de procesos manuales
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!