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
Eddi Din [679]
4 years ago
12

6.12 Nested Increments Write a program for spiritual lumberjacks who want to show their appreciation for each tree they 'kill' b

y celebrating its years of life. Ask the lumberjack how many trees he wants to cut. Verify you got the number correctly by printing it to output. Write a loop that iterates over all the trees the lumberjack wants to cut down. Print the tree number to the screen to make sure your loop is working correctly. Query the lumber jack for how many rings are in this tree and print this number to make sure you got the correct number of rings. Write an inner loop that iterates over the years of the tree. Print each year to make sure you are iterating correctly and hitting each year that it lived. Change the necessary print statements and to match the correct formatting from the output examples.
Computers and Technology
1 answer:
Nina [5.8K]4 years ago
7 0

Answer:

trees_to_cut = int(input("How many trees do you wants to cut? "))

print(str(trees_to_cut) + " tree(s) will be cut.")

for i in range(trees_to_cut):

   print("Tree #" + str(i))

   

   rings = int(input("How many rings in tree " + str(i) + "? "))

   print("There are " + str(rings) + " ring(s) in this tree.")

   for j in range(rings):

       print("Celebrating tree #" + str(i) + "'s " + str(j+1) + ". birthday.")

Explanation:

*The code is in Python.

Ask the user to enter the number of trees to cut

Print this number

Create a for loop that iterates for each tree

Inside the loop:

Print the tree number. Ask the user to enter the number of rings. Print the number of rings. Create another for loop that iterates for each ring. Inside the inner loop, print the celebrating message for each birthday of the tree

You might be interested in
Which statement is true regarding achievers?
Tanya [424]

Answer: the acheve stuff

Explanation: that person is not an achiever if they dont achieve their goals

5 0
3 years ago
Is Wikipedia or a .gov website with more information about the subject not a good enough explanation not a good explanation for
FromTheMoon [43]

Answer:

no

Explanation:

Wikipedia  can change the answers everyday and the answer are not true, but the gov website only tells about the government not any subject.  

8 0
3 years ago
The mouse and keyboard are also sometimes called
likoan [24]
Hi!

The mouse and the keyboard are <em>input devices. </em>By using them, we can input data which will give us a (hopefully) desired output!

For example...

Just by using my keyboard to type, I'm inputting data in the form of ASCII characters and symbols.

By using my mouse to click on an area so I can move this sentence on a new line, I had to input a request to do such!

Hopefully, this helps! =)
7 0
4 years ago
When you use a business class with an object data source, the business class Group of answer choices must have attributes that m
DedPeter [7]

Answer: must have public properties that match the names of the bound fields

Explanation:

When a business class is used with an object data source, the business class must have public properties that match the names of the bound fields.

Having an attribute which match the names of the bound fields isn't necessary as well as having a constructor with parameters that match the names of the bound fields

Therefore, the correct option is B.

3 0
3 years ago
Abram needs to put multiple sets of data into the same type of calculations for different companies, so he will create a
Nesterboy [21]

Answer:

Themes, Cell Styles, Conditional Formatting, and Formulas

Explanation:

Got it right on Edg.

7 0
3 years ago
Other questions:
  • How does sea floor spreading relate to supercontinents? A. It lowers the overall water level in the ocean so land masses can joi
    13·2 answers
  • Cover page styles in the cover page gallery match the preformatted styles in word, making it easier to create a coherent style b
    5·1 answer
  • To connect multiple usb devices to a single usb port, a ____ can be used.
    12·1 answer
  • Which of the following is the MOST important consideration when planning your budget?
    7·2 answers
  • Which osi layer defines the functions of logical network-wide addressing and routing?
    14·1 answer
  • John just opened a savings account and wants to maximize the account of interest you earn which of the following actions would e
    13·1 answer
  • The Classic Triangle Testing Problem, (Myer's Triangle): A program reads three integer values. The three values are interpreted
    10·1 answer
  • A manager keeps a record of daily each transaction in input.txt. Each line contains three items: The invoice number, the cash am
    5·1 answer
  • Design a Ship class with the following members:
    13·1 answer
  • PLEASE HELP. Nobody has been helping me, i need to resolve this code issue for game design
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!