Apr-20-2019, 07:06 PM
Hey, I've got this task to coplete. I must do it using While:
Room length is A meters and with is B. How many square carpets, which have an edge of C meters, do you need to fully fill a room? You can't use multiplication or division.
Room length is A meters and with is B. How many square carpets, which have an edge of C meters, do you need to fully fill a room? You can't use multiplication or division.
a=float(input('What is the length of the room? ')) b=float(input('What is the width of the room? ')) c=float(input('What is the length of square carpet edge? ')) i=0 while a >= c: a = a - c i = i + 1 print(i)I could only manage to count one column of carpets and whey won't fill the floor completely if the length was a float number.