[Tutor] Tile Code Program
Dave Angel
davea at davea.name
Fri Oct 10 22:57:18 CEST 2014
<niyanaxx95 at gmail.com> Wrote in message:
>
>
(Please use text mail to post here)
>>>>>>>>
roomWidth = 100.0. #BUGBUG
roomLength = 90.0
while roomWidth < 100 or roomWidth > 1000:
roomWidth = float(input("Please enter a room width between 100
and 1000: "))
if roomWidth >= 100 or roomWidth <= 1000:
print("Invalid entry")
while roomLength < 100 or roomLength > 900:
roomLength = float(input("Please enter a room length between
100 and 900: "))
if roomLength >= 100 or roomLength <= 900:
print("Invalid entry.")
>>>>>>>>
a room length of 100 causes the first while to be skipped entirely.
Both the if statements are inside out. You need the same
conditional as you used for the while loops.
--
DaveA
More information about the Tutor
mailing list