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
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)
Comments
Leave a comment