如何 运行 select 代码量 n 用户输入 n 的次数

How to run a select amount of code n amount of times where user input is n

我在尝试将代码的某个部分重复 n 次时遇到了一些问题,其中 n 是用户输入。它会像

这样开始
roominput = int(input("How many rooms do you require painting?"))

然后用户输入 integer(n),程序的 select 部分将重复 n 次,询问房间名称、房间尺寸和墙壁油漆颜色.

你的意思是这样的吗?

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?")