내 코드에서 알 수 있듯이 카펫 피팅 서비스 프로그램을 만들려고합니다! 하지만 두 번째 기능에 도달하면 왜 멈추는 지 잘 모르겠습니다! 내 코드를 분석하고 잘못된 점을 보여 주시겠습니까? 나머지 코드를 보면 내 문제 만 이해할 것을 두려워합니다. 마음에, 나는 아주 새로운 초보자입니다.기능이있는 추적 출력
문제 (코드 - 나는 그것을 찾을 수 없습니다) :
https://pastebin.com/SWMYEAfE
출력 :
This is Carpet Diem Carpets and we hope we are able to help you today!
We first need your personal details, so can you please choose your title.
Mr, Mrs, Miss, Ms, Dr, Lady or Lord?Lord
Well, what is your last name, Lord?
>>Test
Here at Carpet Diem Carpets...
We offer a variety of different levels of quality -
With varying prices, of course, Lord Test!
We can fit your carpets at £6.50 per square meter - the Basic level.
Standard for £18.75.
And, for those who like to live as the very best, Luxury for £29.50!
There is also a 3.75 fee per square meter.
How many rooms do you want 'carpeted'?
>>3
Traceback (most recent call last):
File "C:\Users\mikec\OneDrive - Ilford County High School\Computing HW.py", line 144, in <module>
loopquality()
File "C:\Users\mikec\OneDrive - Ilford County High School\Computing HW.py", line 28, in loopquality
for x in range(nor):
TypeError: 'function' object cannot be interpreted as an integer
>>>
'for x in range (nor)'는'nor()'를 호출 한 결과 대신'nor' 함수를 전달하므로 오류 메시지가 발생합니다. –
고마워, 피터! 나는 이전에 당신의 메시지를 이해하지 못했지만, 그랬습니다. 고마워! –