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
AVprozaik [17]
3 years ago
12

Write a program that will allow a grocery store to keep track of the total number of bottles collected for a seven-day period. T

he program should allow the user to enter the number of bottles returned for each day of the seven-day period. The program will accumulate the total number of bottles returned for the 7-day period. Then calculate the amount paid out (the total bottles returned times .10 cents). The output (display) of the program should include the total number of bottles returned and the total paid out. Allow the user to enter multiple transactions
Computers and Technology
1 answer:
Anna35 [415]3 years ago
7 0

Answer:

  • Print the values days of bottles.
  • Display total number of bottles collecting.
  • Display the payout for this transaction.

Explanation:

Program:-

DEPOSIT_PER_BOTTLE = 0.10

another = "Y"

while another=="Y":

   print("Input Values 7 days of bottles:")

   total = 0

   for I in range(7):

       collected_bottles = int(input())

       total += collected_bottles

   payout = total*DEPOSIT_PER_BOTTLE

   print("Total number of bottles collected: {:,}".format(total))

   print("Payout for this transaction $%.2f"%payout)

   another = input("Do you want to complete another transaction? ").upper()

You might be interested in
What is the name of the image window area that identifies the project you are working on?
Natali5045456 [20]
The answer is the title bar becuase it would tell the name of the project or something else such as when you are using Words then it would tell you the name of the title of the document you are doing.
6 0
3 years ago
Read 2 more answers
how do you call the squares method to compute the first five squares and store the result in an array numbers
IRINA_888 [86]

Answer:

The method can be called using:

int[] returnarray = Squares();

<em>Where returnarray represents the name of the array</em>

Explanation:

To answer this, I will make an assumption that the Square method is an int array method (i.e. it returns array).

So, to call the method from main, an array has to be declared to get the values:

int[] returnarray = Squares();

Then an iteration is created to iterate through the array in order to print the array elements.

for (int i = 0; i < returnarray.length; i++)

 System.out.print(returnarray[i]+ " ");    

-------------------------------------------------------------------------------------------

The answer ends here

-------------------------------------------------------------------------------------------

As an addition, the complete program that includes the method and the main is:

<em>public class Main{</em>

<em> public static int [] Squares(){</em>

<em>     int [] arr = new int[5]; </em>

<em>     for(int i = 1;i<6;i++){</em>

<em>         arr[i-1] = i*i;</em>

<em>     }</em>

<em>     return arr;</em>

<em> }</em>

<em> public static void main(String[] args) {</em>

<em>  int[] returnarray = Squares();</em>

<em>  for (int i = 0; i < returnarray.length; i++)</em>

<em>  System.out.print(returnarray[i]+ " ");          </em>

<em> }  </em>

<em>}</em>

8 0
3 years ago
This may vary in your state, but S/P2 recommends keeping all environmental documentation a minimum of:
Anettt [7]

A would be the answer!!!...

4 0
3 years ago
Read 2 more answers
Which of the following statements contains an error?
ASHA 777 [7]
I. is syntactically correct if genderString exists. if genderString, for example, is "Male", then char gender would be the character at index 0 (the first character), meaning 'M'.

II. is incorrect. It is using the comparison operator (==) instead of the assignment operator (=). It is also setting a boolean variable to a String value of 'F'. Boolean values cannot hold string values, and can only hold true & false. 

III. is correct if ageString only contains numbers (presumably, it does, as it's called ageString). Integer.parseInt is a function that converts String values to integer values if the string values only contain numerical characters.

The answer in this case should be B. II only.
5 0
3 years ago
True or False: Cracking a Vigenère cipher with brute force takes longer than a Caesar cipher, but it is still a reliable method
iragen [17]

Answer:

False

Explanation:

The Vigenere cipher is an encryption method that uses a series of interwoven Ceaser ciphers and a keyword to encrypt text. The difference between this cipher and the Ceaser cipher is the tabular interwoven Ceaser cipher and the keyword.

Multiple keywords can be used in the Vigenere cipher. The use of this keyword makes the brute-force decipher algorithm unreliable for decoding text encrypted with it.

7 0
2 years ago
Other questions:
  • Which of the following would likely be covered under homeowners insurance but NOT by renter's insurance?
    9·2 answers
  • You want to create a directory called ~/Documents/papers, but you’re not sure that the ~/Documents directory exists. What comman
    15·1 answer
  • What are issues to consider when deciding to build software in-house or purchase commercial off-the-shelf software (cots)?
    14·1 answer
  • In symmetric encryption the same key is used to encrypt and decrypt a message. in asymmetric encryption different keys are used
    6·2 answers
  • A personal identification number (PIN) that opens a certain lock consists of a sequence of 3 different digits from 0 through 9,
    7·1 answer
  • 1.Customer service is assistance provided by a company to the people who buy or use its products or services.
    13·2 answers
  • While surfing online, Patricia checks her email and reads the latest messages. She then browsers a website and logs in a comment
    8·1 answer
  • What is word processors​
    8·1 answer
  • What should you do if your computer is running slower
    12·1 answer
  • you have a shop in Salem, Illinois, that sells specialty chocolates. Some customers from France have started placing orders. Whi
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!