Answer to Question #320883 in Python for leigh

Question #320883

Farmer Brown


Leg_number = chickens*2 + cows*4 + bees*6 


A farmer has chickens with 2 legs, cows with 4 legs, and bees with 6 legs on his farm. Write a program that, given the number of chickens, cows and bees, will output the total number of legs 


1
Expert's answer
2022-03-30T07:39:20-0400
chickens = int(input("Number of chickens: "))
cows = int(input("Number of cows: "))
bees = int(input("Number of bees: "))

leg_numbers = chickens*2 + cows*4 + bees*6 
print("The number of legs is", leg_numbers)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS