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
Gwar [14]
3 years ago
5

A farmer sells tomatoes. For some reason, the farm obeys mechanical laws of fate.

Computers and Technology
1 answer:
Mars2501 [29]3 years ago
8 0

Answer:

Here are the if/elif statements:

if tomatoes == 24:  #if farmer sells exactly two dozen tomatoes

   watermelons +=4  #farmer receives 4 watermelons

elif tomatoes >= 12:  #else farmer sells at least a dozen tomatoes

   watermelons +=2  #farmer receives 2 watermelons

else:

   tomatoes<12   #On the days that farmer sells less than a dozen tomatoes

   apples +=1  #farmer will get a single apple

Explanation:

You can test the working of these if elif statements by this program:

tomatoes = int(input("Enter the amount of tomatoes sold: "))  #prompts user to enter number of tomatoes

watermelons = 0  #initialize watermelons value to 1

apples = 0  #initialize apples value to 1

if tomatoes == 24:

   watermelons +=4

elif tomatoes >= 12:

   watermelons +=2

else:  

   tomatoes<12

   apples +=1

   

print("Number of watermelons recieved: ",watermelons)  #displays the received number of watermelons

print("Number of apples recieved: ",apples )  #displays the received number of apples

You might be interested in
A computerized spreadsheet program is useful for
Vaselesa [24]
Its c storing and charting data from surveys
6 0
4 years ago
Read 2 more answers
30 POINTS !!!!!!!!
alex41 [277]

this should help! i read over the article a little bit and it seems to answer your question pretty well. https://www.snap.com.au/articles/the-pros-and-cons-of-digital-and-offset-printing.html

7 0
3 years ago
Find the error in the following code fragment. int a: System.out.print(a):​
trapecia [35]

Answer:

If your using java, then its supposed to be "System.out.print("a")"    

Explanation:

its supposed to have quotations

7 0
3 years ago
Strengths and weaknesses about esport
grandymaker [24]

Answer:

you can practice and make money it can also do bad on your eyes ik cuz i do esports

Explanation:

8 0
4 years ago
A good website design combines which of the following elements? (select all that apply) powerful web server hardware components
Anarel [89]

Sounds like it'd be all of the above.


7 0
3 years ago
Read 2 more answers
Other questions:
  • Race conditions are possible in many computer systems. Consider a banking system with two methods: deposit(amount) and withdraw(
    14·1 answer
  • If you touch a downed power line covered or bare, what’s the likely outcome?
    10·2 answers
  • The set of folders and subfolders that MATLAB searches through to locate a command or M-file is called the ___________.(fill in
    9·1 answer
  • Joe sends a scathing e-mail to his boss regarding increased work hours. Joe tries to deny sending the e-mail, but is unable to d
    9·1 answer
  • Consider a router that interconnects four subnets: S1, S2, S3, and S4. Suppose all of the interfaces in each of these four subne
    9·1 answer
  • How should resumes and cover letters be written to help you obtain a job that meets your
    14·1 answer
  • I need help building a computer what are some good parts?
    9·1 answer
  • Macro mode is used to take landscape photographs of subjects fairly far from the camera.
    12·2 answers
  • WILL GIVE BRAINLIEST!!! PLEASE HELP!!!
    5·1 answer
  • _____ is a system in which a finite set of words can be combined to generate an infinite number of sentences.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!