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
____ [38]
2 years ago
5

A cookie recipe calls for the following ingredients:

Computers and Technology
1 answer:
Romashka [77]2 years ago
4 0

def cookie_Recipe(recipe):

   

   sugar=(0.03125*recipe)

   butter=(0.02083333333*recipe)

   flour=(0.05729166666*recipe)

   LF1=round(sugar, 2)

   LF2=round(butter,2)

   LF3=round(flour, 2)

   print("You will need:")

   print(LF1, "cups of sugar")

   print(LF2, "cups of butter")

   print(LF3, "cups of flour")

   print("To make", recipe, 'cookies')

recipe=int(input("How many cookies do you want to make?\n"))

cookie_Recipe(recipe)

You might be interested in
In this assignment, you will design and create an ArrayList-based application that manages a collection of DVDs. Information abo
sergij07 [2.7K]

Create and design an arraylist based application which manages a DVDs collection.

Explanation:

DVD movie consists of a title, a rating (e.g. PG, R, etc.), and a running time in minutes.

In this project, you will create an application to allow the user to maintain a collection of DVD movies using an array.

When the application starts up, it will read in the DVD data from a text file to initialize the array, if the file is available. If the file is not there, then the program starts with an empty array. If the file is corrupted (has an invalid or missing value), then the program stops its initialization at the point of the error. The data file should contain one DVD per line, with title followed by rating followed by running time in minutes, all separated by commas. You may assume titles are all in uppercase and do not contain commas. For example:

ANGELS AND DEMONS,PG-13,138

STAR TREK,R,127

UP,PG,96

The titles may not be in alphabetical order, but the DVDs should be inserted into the array in alphabetical order.

The application will then allow its user to perform the following operations:

ADD OR MODIFY DVD - The user will be prompted to enter the title, rating and running time (in minutes) for a DVD. If the title is already in the array, then the rating and running time are updated to the supplied values. If the title is not in the array, a DVD is added to the array so that the array is sorted by title. Convert all titles to uppercase only.

REMOVE DVD - The user will be prompted to enter the title of a DVD. If the title is in the array, then the DVD is removed, shifting subsequent DVDs over one position to fill in the gap left by the removed DVD. Again, titles must match exactly (in uppercase).

GET DVDs BY RATING - The user will be prompted to enter a movie rating (e.g. PG). This operation displays a string containing all DVDs matching the given rating in the order that they appear in the DVD collection, separated by newline characters.

GET TOTAL RUNNING TIME - This operation displays the total running time of all DVDs in the collection for the user.

SAVE & EXIT - The user can quit the program, performing an automatic save if the DVD collection has been modified.

Java Files

DVD.java - A class to model a single DVD, including its title, rating and total running time.

DVDCollection.java - A class to model a collection of DVDs using an array.

DVDUserInterface.java - An interface that describes the operation required for any user interface to this DVD collection.

DVDGUI.java - A class that implements the DVDUserInterface interface and provides a graphical user interface to the DVD collection.

DVDConsoleUI.java - A class that implements the DVDUserInterface interface and provides a console user interface to the DVD collection.

DVDManager.java - A class that contains a main method that launches one of the two user interfaces for the user to work with the DVD collection based on the user input.

Complete the DVD class by completing the given methods (constructor, accessors and mutators). Add javadoc comments so you can generate a javadoc documentation file showing how to use this class.

The DVDCollection class uses an array to maintain the collection of DVDs. The DVDs should be stored in alphabetical order based on title starting at position 0 in the array, using adjacent cells. All titles should be stored in uppercase only and are assumed to be unique (no duplicates).

toString - returns a string containing all of the DVDs in the collection, separated by newlines characters, along with the value of numdvds and the length of the DVD array for debugging purposes. The string should be formatted as shown in the example below:

numdvds = 3

dvdArray.length = 7

dvdArray[0] = ANGELS AND DEMONS/PG-13/138min

dvdArray[1] = STAR TREK/R/127min

dvdArray[2] = UP/PG/96min

addOrModifyDVD - given the title, rating and running time of a DVD, add this DVD to the collection if the title is not present in the DVD collection or modify the DVD's rating and running time if the title is present in the collection.insert the DVD so that all DVDs are in alphabetical order by title.

removeDVD - given the title, this method should remove the DVD with this title from the collection if present. The title must match exactly (in uppercase). If no title matches, do not change the collection.

getDVDsByRating - given the rating, this method should return a string containing all DVDs that match the given rating in the order that they appear in the collection, separated by newlines.

getTotalRunningTime - this method should return the total running time of all DVDs in the collection. If there are no DVDs in the collection, return 0.

loadData - given a file name, this method should try to open this file and read the DVD data contained inside to create an initial alphabetized DVD collection.

save - save the DVDs currently in the array into the same file specified during the load operation, overwriting whatever data was originally there.

7 0
3 years ago
Calculate the data rate capacity for a 2400 baud signal where there are M=8 levels per symbol. a. 2400 bps b. 4800 bps c. 7200 b
zimovet [89]

Answer:

C. 7200 bps.

Explanation:

In networking, transmission lines or connectors and ports operates at a specific speed based on the port type and the cable or medium of transmission.

Baud rate is a concept in digital information technology that defines the rate of symbol per channel during transmission. The bit or data rate is the number of bits transfered in a link per second.

The relationship between baud rate and bit rate is;

Bit rate = baud rate x number of symbol bit level

To get the bit rate of a 2400 baud signal with symbol level = 8 = 2^3

Bit rate = 2400 x 3. = 7200 bps.

7 0
3 years ago
The case states that google intended the limited initial rollout to be a beta test of google glass, meaning that the adopters we
tigry1 [53]

Google intended the limited initial rollout to be a test of google glass, that the adopters were Innovators. The initial rollout of Google Glass was limited, purposefully so as to set the price very high. This mean that only a selected few, and those with plenty of disposable income, would be the first to use these devices. Google required people to register for the chance to receive a set. Even if many would want to spend the money on these devices, Google allowed only a selected few to receive them.

7 0
3 years ago
How do you fix The lag on your zsnes emulator
GenaCL600 [577]
Try resetting the phone if that doesn’t work do a hard reset
7 0
2 years ago
PART 2 - Exercise 2 - Programming Assignment
Oliga [24]

Suppose that a linked list is used as a data structure for the hash table, create a program that includes steps his application counts the number of phrases in documents decided on via way of means of the user #include.

<h3>What is Programming?</h3>

It is the manner of making hard and fast commands that inform a pc the way to carry out a task. Programming may be finished the usage of lots of pc programming languages, inclusive of JavaScript, Python, and C++.

  1. This application counts the quantity of phrases in documents decided on via way of means of the user.
  2. #include
  3. #include
  4. #include the usage of namespace std; //Function 1 int count(string word)go back word.size();
  5. }
  6. //Function 2
  7. int vowel(string word)> filename;
  8. //Open the {input|enter">enter file.
  9. inputfile.open(filename.c_str()); cout<<"nWord listing after format";
  10. cout<<"n____nn"; //If the file succesfully opened, process it.if (inputfile).

Read more about program :

brainly.com/question/1538272

#SPJ1

5 0
1 year ago
Other questions:
  • Build three classes that conform to the following interfaces. Use arrays in creating your classes (e.g., do not use the built-in
    8·1 answer
  • Sleeping is an effect of _______ , but agitation may cause a person to wake up
    7·2 answers
  • 1) Put the following in order from smallest to largest A) 1,500,000 bytes B) 2,000 kilobytes C) 0.01 petabytes D) 1 Terabyte E)
    8·1 answer
  • Bit stream methods commonly use algorithm functions like the exclusive or operation (__________.
    11·1 answer
  • )What is proceduralabstraction, and why is it important inComputer Science
    14·1 answer
  • Components that enhance the computing experience, such as computer keyboards, speakers, and webcams, are known as
    7·1 answer
  • The following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) — (Weight x 0.09
    11·1 answer
  • Creating a call conversion in Google Ads and adding a phone snippet to a web page allows advertisers to use a Google forwarding
    11·1 answer
  • Edhesive unit 4 test
    9·1 answer
  • A while loop is frequently used to ______________ data.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!