Adam is so good at playing arcade games that he will win at every game he plays. One fine day as he was walking on the street, he discovers an arcade store that pays real cash for every game that the player wins - however, the store will only pay out once per game. The store has some games for which they will pay winners, and each game has its own completion time and payout rate. Thrilled at the prospect of earning money for his talent, Adam walked into the store only to realize that the store closes in 2 hours (exactly 120 minutes). Knowing that he cannot play all the games in that time, he decides to pick the games that maximize his earnings
Sample game board at the arcade GAME COMPLETION TIME (in minutes) PAYOUT RATE Pac-man 90 400 Mortal Kombat 10 30 Super Tetris 25 100 Pump it Up 10 40 Street Fighter II 90 450 Speed Racer 10 40
An acceptable solution is the one where it still picks the best earnings even when the list of games or completion times or payout rates change.
Question:
Write code in Java/Scala/Python to help Adam pick the sequence(s) of games that earn him the most money?.
Then, assume you have a variable list of games and their payout rates. What is the best way to pick the games that earn you the most?
Input Explanation
The first line of input is always an integer denoting many lines to read after the first line. In our sample test case, we have 6 in the first line and 6 lines after the first line, each having a game, completion_time and payout_rate.
In each data line, the game, completion_time and payout_rate are separated by a ','(comma).
The games board may change but the store still closes in 120 minutes.
Input
6
Pac-man,80,400
Mortal Kombat,10,30
Super Tetris,25,100
Pump it Up,10,40
Street Fighter II,90,450
Speed Racer,10,40
Output Explanation
Print the game names that earn him the most into the standard output in alphabetical order
Output
Mortal Kombat
Pump it Up
Speed Racer
Street Fighter II

Answers

Answer 1

Answer:

ask it to ur teacher boiiiiii


Related Questions

The OpenMP critical-section compiler directive is generally considered easier to use than standard mutex locks, because

Answers

Complete question

A) management of entry and exit code is managed by OpenMP library reducing the possibility of programming errors.

B) programmers don't need to worry about race conditions.

C) a thread cannot block inside a critical section.

D) deadlock cannot occur.

Answer:

A. Management of entry and exit code is managed by OpenMP library reducing the possibility of programming errors

Explanation:

This is a multiple choice question and this is the answer because:

1. OpenMp is inclusive of an APL/compiler directives:

2. any code which follows #pragma omp parallel is a parallel region and it is performed by large number of threads that are same as the number of processing cores that are in the system.

3. The critical-section compiler directive acts more like a binary semaphore or mutex lock,it makes sure that only one thread is active in the critical section at the same time.

Please help this computer science question(Pseudocode and Trace table)

Answers

Answer:

can u explain more specific plz

Explanation:

Add the beginning comments at the top of the program.
In the first part of your program, create a for loop that runs three times:
Inside the for loop, prompt the user for an integer
Prompt the user for another integer
Call the function compare (you are going to create this function next)
Pass the variables that you used for the integer inputs from above
Create a function called compare (remember the function definition should go at the top of the program) and use two variables in the parameters of the function:
Inside of the function, create an if / elif / else structure that compares the two values passed into the function
If one value is less than the other, output that to the user (Ex: 2 is less than 4)
Elif the other value is less than the other output something similar (Ex: 4 is less than 9)
Else, output that they are equal to each other
That is it for the first part of the program.
Next, create an empty list called names.
Create a loop that runs 6 times:
Inside of the for loop, prompt the user for a name
Append the name to the list
Outside of the for loop, prompt the user for how many people they would like to vote off the island.
Call the function eliminate and pass the variable you used from step 7 to it.
Also, this function will return a value, so store this back function call back to a new variable.
Create a function called eliminate and create a variable to use as the parameter:
Inside the function, randomly shuffle (use the shuffle() method) all the values in the list (you will need to import random at the top of the program)
Then using a for loop, loop it as many times as the value that was passed to the function:
Inside the for loop, remove one name from the list (use the pop() method)
Outside the for loop, but still inside the function, return the list of remaining people
Underneath where you left off in step 8, print the remaining people that are left: those that did not get voted off the island.
WILL GIVE BRAINIEST!

Answers

Answer:

#################

# Python Practice

#################

# Part 1

# ------------------------------------------------------

run_compare = 3

ran_compare = 0

while run_compare != ran_compare:

   num1 = int(input('Please input the first number: '))

   num2 = int(input('Please input the second number: '))

   def compare(number1, number2):

       if number1 < number2:

           print(f'{num1} is less than {num2}')

       elif number1 > number2:

           print(f'{num1} is greater to {num2}')

       else:

           print(f'{num1} is equal than {num2}')

   compare(num1, num2)

   ran_compare += 1

# ------------------------------------------------------

# Part 2

run_name = 6

ran_name = 0

names = []

# ------------------------------------------------------

while run_name != ran_name:

   name = input(str('Please insert a name: '))

   names.append(name)

   print(names)

   ran_name += 1

# ------------------------------------------------------

give me a second im going to resolve the last part but this is what i have so far

Following are the program to the given question:

Program Explanation:

Import random package as r.Defining a method "compare" that takes two variable "n1,n2" inside the parameter.In the next step, a conditional statement is declaed that checks the parameter value and prints its value. Defining a method "eliminate" that takes two variable "n, names" inside the parameter.It calls the shuffle method, and define a for loop that removes names value and return its value.In the next step, a for loop is defined inside this two variable "i1, i2" is declared that inputs value and calls the comapre value.In the next line, an empty list "names" is declared inside this a for loop is defined that inputs name value and calls the "eliminate" method and print its calculated value.

Program:

import random as r#import package random

def compare(n1, n2):#defining a method compare that takes two parameters  

   if n1<n2:#defining if block that checks n1 value less than n2 value

       print("{} is less than {}".format(n1, n2))#print value with the message

   elif n2<n1:#defining if block that checks n2 value less than n1 value

       print("{} is less than {}".format(n2, n1))#print value with the message

   else:#defining else block

       print("{} and {} are equal".format(n1, n2))#print value with the message

def eliminate(n, names):#defining a method eliminate that takes two parameters

   r.shuffle(names)#calling the shuffle method

   for i in range(n):#defining a for loop that checks n values

       names.pop()#calling pop method to remove value

   return names #return a names value  

for i in range(3):#defining a for loop that inputs value

   i1 = int(input("Enter an integer: "))#defining i1 value to input value

   i2 = int(input("Enter another integer: "))#defining i2 value to input value

   compare(i1, i2)#calling the compare method  

   print()#using print to break line  

names= [] #defining an empty list      

for i in range(6) :#defining a loop that inputs name value

   name = input("Enter name: ")#defining name variable that inputs value

   names.append(name)#calling append method  

n = int(input("\nHow many people you would like to vote off the island: "))#defining n variable that input value

new_names = eliminate(n, names)#defining new_names that calling eliminate method

print("\nRemaining people that did not get voted off the island:")#print message

if(len(new_names) != 0):#defining if block that checks new_names length not equal to 0

   for name in new_names:#defining a for loop that checks name is in new_names

       print(name)#print name value

else:#defining else block  

   print("None")#print message None

Output:

Please find the attached file.

Learn more:

brainly.com/question/21922031

explain the major innavotions made from the establishment of abacus​

Answers

Answer:

The abacus is one of many counting devices invented to help count large numbers.

Explanation:

Ryan is a manager who maintains an official record of the events that happen in his company. At the end of the day, he writes about the events that took place. The words that he frequently mentions in his record are today, client, and meeting. The moment he types the first two letter of these words, they appear as a suggestion. Which feature of the word processing program makes these suggestions

Answers

Answer: word completion

Explanation:

Answer:

Word Completion

Explanation: because i took the test.

What is cybercrime?
Describe some of the various cybercrimes?
What are the laws that govern cybercrimes?
What can we do to prevent being a victim?

Remember to provide examples.

Answers

Answer:

criminal activities carried out by means of computers or the internet is known as cyber crime.

Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smallest and largest integers in the list.

Ex: If the input is:

10
5
3
21
2
-6
the output is:

2 and 21

Answers

n = 1

lst = []

while n > 0:

   lst.append(n := int(input()))

lst.pop(-1)

print(str(min(lst)) +" and "+str(max(lst)))

I wrote this code in python 3.8. I hope this helps

What is the name of the variable in the
following code?

Answers

Answer:

Lift

Explanation:

When coding, you use a variable name for an object, and assign it to move up, down, and/or sideways.

Lift is the answer for that

A formal method for designing and representing human-computer interaction dialogues using box and line diagrams is called:________.

Answers

Answer:

Dialogue Diagramming

Explanation:

Dialogue is simply a sequence of interaction that usually occurs between a user and a system.it consists of Designing the dialogue sequence, Building a prototype and Assessing Usability

Dialogue diagramming is a known widely anf formal means by which we are designing and representing human-computer dialogues using box & line diagrams.

For all programs, you should write a small amount of code and _______
it before moving on to add more code?

Answers

Answer:

test

Explanation:

One newly popular development paradigm is "test-driven development"; which borrows agile engineering principles in architecting project components.

Which of these parts serves as the rear cross structure of a vehicle?
Rear body panel
Rear bumper cover
Rear rails
Rear core support
ontents

Answers

Answer:

Rear bumper cover

Explanation:

Question 24 Multiple Choice Worth 5 points)
(01.04 MC)
Zavier needs to compress several files. Which file type will allow him to do this?
ODOC
GIF
OJPG
O ZIP

Answers

Answer:

ZIP

Explanation:

ZIP is a type of compression file as Jpg is a picture file, Gif is a picture file, and ODOC stands for Oklahoma Department of Corrections

TBH:

it may be O ZIP but i've never heard of it.

Answer:

Zip (D)

Explanation:

Took The Test

Amanda would like to add text to a slide in her presentation. Select all of the correct methods she can use to add text.
Select "Text" from the Insert menu.

Click in the Task pane and enter text.

Draw a text box, click in it, and enter text.

Click in a placeholder and enter text.

PLEASE help

Answers

Answer:

Draw a text box

Explanation:

Because if she draw it she can edit and write what she want

If I want to control the aperture and I want the camera to control the shutter speed which setting on the mode dial is most appropriate?
a)AV
b) TV
c) M
d) P
since this is my last question im giving 100 points and brainliest

Answers

Answer:

answer is a

hopes this helps

Most slide layouts include at least one ________ by default.
Question 2 options:

placeholder

action button

transition

animation

Answers

Hey

I think that the answer placeholder :)

Sry if im wrong tho

Answer:

The answer is placeholder.

write a an algorithm to find out volume?​

Answers

This for the algorithm of a sphere:
Define the radius of the sphere.
Define the pie and assign (22/7)
Calculate the volume of the sphere as (4/3)*pie*r3
Assign the volume of the sphere to volume_of_sphere.
Print the volume of the sphere.

PLS HELP ASAP- Select the correct text in the passage.
Which concept explained in the paragraph below means that data always remains consistent?

Specific programs have some tasks that a computer must perform in parallel with others. These tasks (such as the performance of the same set of operations on different data sets) often work in parallel clusters. In such cases, a separate thread of execution handles each separate task. You can think of a thread as a sequence of instructions that computers can manage independently.
It is possible for different threads to access the same data elements and change their values, and this can lead to an inconsistent state of information. For instance, if multiple programs access a shared variable x and change its value, the variable will not contain the correct value at the end of the programs. We can prevent such inconsistencies by using locks. A thread puts a lock on shared data, and releases this lock only after completing its operations.

Answers

Answer:

reread the text

Explanation:

I do it it helps

Answer:

A thread puts a lock on shared data, and releases this lock only after completing its operations.

The last sentance

Explanation: TRUST ME ISTG THATS THE ANSWER

What is the name of the tab that becomes available after you add and select an image in your PowerPoint presentation?
Home
Insert
Picture
View

ASAP PLS

Answers

Answer:

INSERT

Explanation:

INSERT PCIURE

how to earn money fast in adopt me?

Answers

Become a baby and take care of yourself and pets

Answer:                                                                                                                        If you want money in adopt me quickly, you could become a baby and buy a pet and take care of it and yourself. Also, you could purchase adopt me bucks with robux.

Explanation:

Learning Task 3: Below are different electronic diagrams. Write the name of
the diagram on your answer sheet.
BELL
Input
Video
Transform
Quantization
Entropy
Coding
Output
Bitstream
Inverte
Quantization
1 2 3
Inverse
Transform
Number to be
dropped when
energized by
electric current
Annunciato
DOOD
Intor intra
Prediction
Frame
Buffer
Ordinary
Push Button​

Answers

Answer:

WAOW

Explanation:

You did better than I can

C:/Users/Documents/resume.docx Where is the "resume" document located in this file structure?

Answers

Answer:

"resume.docx" is located in "Documents"

Explanation:

[<drive-letter:: represents drive name>]:/Main_Directory/Sub_Directory/ETC..

The  "resume" is located in the "Documents" according to the file structure.

Given the information C:/Users/Documents/resume.docx, this can be interpreted as Documents is in the Users folder and the resume can be found in the Document folder.

We can also say that the document folder was created by the user and the "resume" file is placed directly into the documents.

Based on the explanation, we can say that the  "resume" is located in the "Documents" according to the file structure.

Learn more here: https://brainly.com/question/13715153

Exodia
Principle of Computer Operation​

Answers

Answer:

????

Explanation:


If you wanted readers to know a document was confidential, you could include a ____ behind the text stating
"confidential".
watermark
theme
text effect
page color

Answers

I have no idea for that

Answer:

watermark

Explanation:

In 200 words or more, please describe the Cyber Security Enhancement Act. Include when it was implemented and what it's purpose is

Answers

Answer:

The summary below was written by the Congressional Research Service, which is a nonpartisan division of the Library of Congress.

12/18/2014--Public Law. (This measure has not been amended since it was passed by the Senate on December 11, 2014. The summary of that version is repeated here.)

Cybersecurity Enhancement Act of 2014 - Title I: Public-Private Collaboration on Cybersecurity - (Sec. 101) Amends the National Institute of Standards and Technology Act to permit the Secretary of Commerce, acting through the Director of the National Institute of Standards and Technology (NIST), to facilitate and support the development of a voluntary, consensus-based, industry-led set of standards and procedures to cost-effectively reduce cyber risks to critical infrastructure.

Requires the Director, in carrying out such activities, to: (1) coordinate regularly with, and incorporate the industry expertise of, relevant private sector personnel and entities, critical infrastructure owners and operators, sector coordinating councils, Information Sharing and Analysis Centers, and other relevant industry organizations; (2) consult with the heads of agencies with national security responsibilities, sector-specific agencies, state and local governments, governments of other nations, and international organizations; (3) identify a prioritized, flexible, repeatable, performance-based, and cost-effective approach, including information security measures and controls, that may be voluntarily adopted by owners and operators of critical infrastructure to help identify, assess, and manage cyber risks; and (4) include methodologies to mitigate impacts on business confidentiality, protect individual privacy and civil liberties, incorporate voluntary consensus standards and industry best practices, align with international standards, and prevent duplication of regulatory processes.

Prohibits the Director from prescribing a specific solution or requiring that products or services be designed or manufactured in a particular manner.

Prohibits information provided to NIST for purposes of developing cyber risk standards from being used by federal, state, tribal, or local agencies to regulate the activity of any entity.

Directs the Comptroller General (GAO) to submit biennial reports over a specified period concerning NIST's progress in facilitating the development of such standards and procedures. Requires such reports to address the extent to which such standards: (1) are voluntary and led by industry representatives, (2) have been promoted by federal agencies and adopted by sectors of critical infrastructure, and (3) have protected against cyber threats. Instructs the Comptroller General to include in such reports an assessment of the reasons behind decisions of sectors to adopt or not adopt such standards.

Title II: Cybersecurity Research and Development - (Sec. 201) Directs the following agencies, working through the National Science and Technology Council and the Networking and Information Technology Research and Development Program, to develop, and update every four years, a federal cybersecurity research and development strategic plan:

Explanation:

The U.S. military's standard for computer security is known as
DCS-3000.
TEMPEST.
Daubert standard.
Carnivore.

Answers

Answer:

TEMPEST.

Explanation:

TEMPEST is an acronym for Telecommunications Electronics Materials Protected from Emanating Spurious Transmissions and it is a secret (classified) project of the government of the United States of America that originated with its military in the 1960s based on the study of security with respect to telecommunication devices emitting Electromagnetic Radiation (EMR).

Hence, the U.S. military standard for computer security is known as TEMPEST.

The main purpose of the Telecommunications Electronics Materials Protected from Emanating Spurious Transmissions (TEMPEST) is to prevent the theft, compromise or interception of informations that are being transmitted on various telecommunications devices through the use of Electromagnetic Radiation (EMR).

dad always arrives home from work thoroughly exhausted​

Answers

Yes plz explain your answer

Which feature should be used prior to finalizing a presentation to ensure that audience members with disabilities will be able to understand the message that a presenter is trying to get across?

Compatibility Checker
Accessibility Checker
Insights
AutoCorrect

Answers

Answer:

Accessibility Checker

Answer:

answer is accessibility checker or B on edge




Predict the output
int ma3, n = 5, p=4
if(m==n&&n!=p)
{
System.out.println (m*n) ;
system.out.println(n%p);
}
if (m!=n) " (n==p)

System, out println (m+n)
System.out printen (m-n))
}​

Answers

Answer:

the output will be "hello word"

Multi-part question:

Part 1:

Use MySQL Workbench to create an EER model for a database that stores information about the downloads that users make. (When you create the EER model, it will be given a default name of mydb. For this exercise, it’s not necessary to change this name.) Define the tables that are necessary to implement this data structure:

Each user must have an email address, first name, and last name.

Each user can have one or more downloads.

Each download must have a filename and download date/time.

Each product can be related to one or more downloads.

Each product must have a name.

When you’re done defining the tables, create a diagram for the database. Then, use the diagram to define the required relationships. When you do that, be sure to use the relationship button that uses existing columns.

Part 2:

Create a view named order_item_products that returns columns from the Orders, Order_Items, and Products tables.

This view should return these columns from the Orders table: order_id, order_date, tax_amount, and ship_date.

This view should return the product_name column from the Products table.

This view should return these columns from the Order_Items table: item_price, discount_amount, final_price (the discount amount subtracted from the item price), quantity, and item_total (the calculated total for the item).

Part 3:

Write a SELECT statement that uses the view that you created in part 2 to get total sales for the five best selling products. Sort the result set by the order_total column in descending sequence.

Answers

Answer:

part 1:

Explanation:

For this exercise, you are going to write a recursive function that counts down to a Blastoff!
Your recursive function will not actually print. It will return a String that can be printed from the main function. Each recursive call will add on to that string.
In your main function, prompt the user for a starting value, then print the results.
Sample Output
Please enter a number to start:
5
5 4 3 2 1 Blastoff!
import java.util.Scanner;
public class Countdown
{
public static void main(String[] args)
{
// Start here
}
public static String countdown(int number)
{
// Base case - return Blastoff!
// Recursive call
}
}

Answers

Answer:

import java.util.Scanner;

public class Countdown {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Please enter a number to start: ");

n = input.nextInt();

System.out.print(countdown(n));

}

public static String countdown(int number) {

if(number>0) {     return " "+number+countdown(number-1);    }

   else    {        return " Blastoff!";    }

}

}

Explanation:

The main method begins here

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

This declares an integer variable n

int n;

This prompts user for a number

System.out.print("Please enter a number to start: ");

This gets user input n

n = input.nextInt();

This calls the countdown function

System.out.print(countdown(n));

}

The countdown function begins here

public static String countdown(int number) {

This is the base case where input number is greater than 0

if(number>0) {     return " "+number+countdown(number-1);    }

This ends the recursion

   else    {        return " Blastoff!";    }

}

Other Questions
A Census Bureau report on the income of Americans says that with 90% confidence the mean income of all US households in a recent year was $57,005 with a margin of error of $742. This means that Write an equivalent expression to (-0.25x - 3) - (2.5x + 1.7) using the fewest possible terms. Which allotrope of phosphorus has less ignition temperature? Finish this sentence...The student felt apathy when..... What is the measurement of angle x (in degrees)? Explain how you got your answer. Marco spent $2.50 to wash his car.If two quarters operate the car washfor 60 seconds, how many minutesdid it take Marco to wasl his car? Answer quickly please help real quick on this plzz A recipe calls for 5 cans of corn to serve 4 people. If Jack is planning to serve a crowd of 10 people, how many cans of corn should he purchase? A. 2 cansB. 8 cansC. 15 cansD. 12.5 cans i can't do this, can someone explain Choose the correct spelling of the word. ammendment amendmant amendmint amendment Reread lines 39-55. How is the situation getting worse for themen? Cite textual evidence in your response A bakery made 140 buns. A restaurant bought 80 of the buns. The remaining buns were put into bags of 4 buns each. How many bags of bunsare there? marcus is on a merry-go-round holding a string. you are standing next to him and holding the other end of the string so that the string forms a tangent line to the edge of the merry-go-round. if marcus is 2 meters from the center of the ride, what torque are you applying on him if you pull 30 N? _Nm 12.3 moles of sodium is what mass of Na? Why did British, and Russian governments support Greece rebellion against ottoman rule? A man drove his car a distance of 260 miles in 4 hours. If continuing at this rate is possible, he will travel ____ miles in 8 hours. Someone pls help im sooo behind in maths and im really confused Dylan has a bank that sorts coins as they are dropped into it. A panel on the front displays the total number of coins inside as well as the total value of these coins. The panel shows 90 coins with a value of $17.55 inside of the bank. Dylan only collects dimes and quarters. Determine how many quarters and how many dimes Dylan has. solve the equation for x. What was the cost of each raffle ticket? what am i saying?Espero que voc tenha um bom Natal!HaVe FuN! ( language Portuguese) . Which of the following describes the healthiest ecosystem? *a. An ecosystem that has low biodiversityb. An ecosystem that has high biodiversityc. An ecosystem that has many more producers than any other trophic leveld. An ecosystem that has many more herbivores than any other trophic levele. Answers B and C