python field | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

python field

Write a program to solve a classic ancient Chinese puzzle: We count 35 heads and 94 legs among the chickens and rabbits in a farm. How many rabbits and how many chickens do we have? Hint: Use for loop to iterate all possible solutions.

28th Apr 2018, 8:53 AM
ekhlas Mohamed Abdallah Mohamed
ekhlas Mohamed Abdallah Mohamed - avatar
1 Answer
+ 5
If you have time to count the legs and heads. Why not count the chickens and rabbits? https://code.sololearn.com/cWiO59KC12me/?ref=app
28th Apr 2018, 11:20 AM
Paul
Paul - avatar