我在尝试重复代码的某一部分时遇到了一些麻烦,其中n是用户输入。它会从
开始roominput = int(input("How many rooms do you require painting?"))
然后用户输入integer(n)
并且程序的选择部分将重复n次,询问房间名称,房间的尺寸和墙壁的颜色。 / p>
答案 0 :(得分:0)
你的意思是这样吗?
roominput = int(input("How many rooms do you require painting?"))
for i in range(roominput):
# ask your questions here, it will be executed roominput times
# ask room name - room_name = input("What is the room name?")
# ask room's dimensions - room_dimension = int(input("What is the room's dimensions?"))
# ask paint for the wall - paint = input("What is the wall paint color?")