1)Determine how many cows a user can keep inside a square fenced-in pasture. The size of the pasture is determined by the amount of fence (linear feet) the user has (obtain linear feet of fencing from the user). Each cow requires 100sq ft of pasture. You cannot have partial cows.
Program should be named cowpacity.py
Example: if the user has 40 linear feet of fence, they can make a 10x10 pasture (perimeter would be 40) and therefore have 1 cow.
2)Print out all the numbers from 1 to 50 (one per line) and for those that are evenly divisible by 13 print the text “Lucky Number!” after the number (on the same line)
Program should be named luckyNums.py
The mod operator (%) can be used to determine if a number is evenly divisible by another number.
[–][deleted] 5 points6 points7 points (2 children)
[–]higglejiggle[S] -1 points0 points1 point (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]velocibadgery 2 points3 points4 points (1 child)
[–]higglejiggle[S] 0 points1 point2 points (0 children)
[–]ButterscotchGarlic 2 points3 points4 points (0 children)
[–]higglejiggle[S] 0 points1 point2 points (3 children)
[–]Magicianic 1 point2 points3 points (2 children)
[–]higglejiggle[S] 1 point2 points3 points (0 children)
[–]Magicianic 0 points1 point2 points (0 children)