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
castortr0y [4]
3 years ago
15

Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m

inScore. Hint: meetsThreshold is a logic array that indicates which elements in gameScores are greater than minScore.
Ex: If gameScores is [2, 5, 7, 6, 1, 9, 1] and minScore is 5, then highScores should be [7, 6, 9].

function highScores = GetHighScores(gameScores, minScore)
% gameScores: Array contains all player scores
% minScore: Scores greater than minScore are added to highScores

meetsThreshold = (gameScores > minScore); % Logic array indicates which
% elements are greater than minScore

% Construct a row array highScores containing all player scores greater than minScore
highScores=0;

end;
Computers and Technology
1 answer:
Sever21 [200]3 years ago
8 0

Answer:

The solution is written using Python as it has a simple syntax.

  1. def getHighScores(gameScores, minScore):
  2.    meetsThreshold = []
  3.    for score in gameScores:
  4.        if(score > minScore):
  5.            meetsThreshold.append(score)
  6.    return meetsThreshold
  7. gameScores = [2, 5, 7, 6, 1, 9, 1]
  8. minScore = 5
  9. highScores = getHighScores(gameScores, minScore)
  10. print(highScores)

Explanation:

Line 1-8

  • Create a function and name it as <em>getHighScores</em> which accepts two values, <em>gameScores</em> and <em>minScore</em>. (Line 1)
  • Create an empty list/array and assign it to variable <em>meetsThreshold</em>. (Line 2)
  • Create a for loop to iterate through each of the score in the <em>gameScores</em> (Line 4)
  • Set a condition if the current score is bigger than the <em>minScore</em>, add the score into the <em>meetsThreshold</em> list (Line 5-6)
  • Return <em>meetsThreshold</em> list as the output

Line 11-12

  • create a random list of <em>gameScores</em> (Line 11)
  • Set the minimum score to 5 (Line 12)

Line 13-14

  • Call the function <em>getHighScores()</em> and pass the<em> gameScores</em> and <em>minScore </em>as the arguments. The codes within the function <em>getHighScores()</em>  will run and return the <em>meetsThreshold </em>list and assign it to <em>highScores.</em> (Line 13)
  • Display <em>highScores</em> using built-in function print().
You might be interested in
Between Handshake protocol, change cipher suite, alert and appplication data protocols, the first one to use is:
____ [38]

Answer:

c is the answer I'm pretty sure but wait for more

3 0
3 years ago
Use the_____icon to insert a new record.<br><br> A. *<br> B. X<br> C. =<br> D. &amp;
morpeh [17]

Answer:

i think the answer is point C

8 0
3 years ago
Discuss TWO changes in ICMP that took place with the development of IPV6 and indicate why those changes were made.
max2010maxim [7]

Answer:

Over and above basic medication signaling, but instead of signaling, ICMPv6 could be used for other objectives. It could be utilized for the below description.

Explanation:

That falls into the same category even though IPv4 does through ARP.  

  • <u>Neighbor Discovery</u>:

Used mostly for control of hosts but instead multichannel interface setup.  

  • <u>Router Discovery</u>:

Trying to manage Handheld IPv6 hand-offs.  

Throughout IPv6, within a week of negligible and sometimes more broadcast group, this same ICMPv6 response can begin. The whole last extension connector before another ICMPv6 connector contains a 58-value new Header field.

3 0
3 years ago
Which of these technologies has been most used by terrorist organizations?
Paha777 [63]

Answer:

Phishing and Social Media

Explanation:

A quick web search can give you this information. Terrorist organizations have used social media to socially engineer innocent people into joining their organizations and more. Phishing is also an attack that's used to obtain critical information such as hashes or plaintext credentials to get into people's accounts. This is a tactic that's also been used by terrorist organizations in the past.

5 0
2 years ago
Artists who draw images on a computer often use a stylus in conjunction with special _________ tablets, which offer extra-sensit
hodyreva [135]

Answer:

Graphics is the correct answer to the following question.

Explanation:

The following answer is true because Graphic tablet is the device in which a person can draw graphics, images or they can also draw by their hands with use of digital pen which is use for drawing as they draw images on the paper. we can also say the graphic tablet is used for the digital art.

So, That's why the following answer is correct.

6 0
3 years ago
Other questions:
  • How many megabytes of data can a factory made audio cd hold?
    13·1 answer
  • List THREE different types of mouse:​
    9·2 answers
  • The unique global address for a web page or other resource on the internet is called the ________.
    7·1 answer
  • You work as an IT Technician for uCertify Inc. David, a user, has recently purchased a laptop computer. He is now complaining th
    14·1 answer
  • Write a function ngrams(n, tokens) that produces a list of all n-grams of the specified size from the input token list. Each n-g
    6·1 answer
  • If the predetermined overhead allocation rate is 245% of direct labor cost, and the Baking Department's direct labor cost for th
    13·1 answer
  • Write a program that computes how much each person in a group needs to pay (after tax and tip) when splitting the bill equally.
    5·1 answer
  • RTOS stands for ______ Time Operating System.
    11·1 answer
  • What statement best describes entrepreneurship?
    7·2 answers
  • Taking control of admin functionality and misusing sensitive data that are unauthorized to access are due to.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!