所以我開始使用python和我正在建立一個計算器... 除了它跳過我的一些代碼。我認爲它是我犯的一個錯誤,但我找不到它,它不告訴我有錯誤,所以你們中的任何一個人都可以幫助我? 這是代碼:需要幫助,我的代碼有一個錯誤,我找不到
if Function == '1':
Amount = int (input ('How many Numbers do you need to use (9 numbers max and 2 numbers min):'))
if Amount == '2':
NumberOne = int (input ('Enter The First Number: '))
print ''
NumberTwo = int (input ('Enter The Second Number: '))
Answer = NumberOne + NumberTwo
def print_slow(str):
for letter in str:
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(0.4)
print_slow(str (NumberOne) + ' + ' + str (NumberTwo) + ' = ' + str (Answer))
elif Amount == '3':
NumberOne = int (input ('Enter The First Number: '))
print ''
NumberTwo = int (input ('Enter The Second Number: '))
print ''
Numberthree = int (input ('Enter The Third Number: '))
Answer = NumberOne + NumberTwo + Numberthree
def print_slow(str):
for letter in str:
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(0.4)
print_slow(str (NumberOne) + ' + ' + str (NumberTwo) + ' + ' + str (NumberThree) + ' = ' + str (Answer))
如果你需要的所有代碼,然後就問我會很樂意將它張貼....
感謝您的閱讀!
哪部分被跳過? –