Hey I'm new to the site but I'm taking a class that will probably have me here often asking stupid questions. One of my homework problems is create a python program using a while loop to answer the 100 fowl problem. The 100 fowl problem is a farmer sold 100 fowl at the market rooster $5 each, hens $3 each, and hatchlings 3 for $1. Exactly how many roosters, hens, and hatchlings did he sell.
Now I have started writing the program but I can't seem to get it to work. This is what I have come up with so far.
1_roosters = 0
2_hens = 0
3_hatchlings = 0
4_while roosters < 20:
5_____while hens < 33:
6_________while hatchlings < 300:
7_____________if (roosters*5 + hens*3 + hatchlings/3 == 100) and (roosters + hens + hatchlings == 100):
8_________________print [roosters, hens, hatchlings]
9_____________hatchlings = hatchlings +1
10________hens = hens + 1
11____roosters = roosters + 1
When I run the program python return no results. Please help me figure out why im getting no results. Thanks!
Edited by cmcpart0422: n/a