使用範圍()我沒有收到在Python的書我讀的結束篇問題的用戶輸出。缺少的輸出,在Python
的問題是:
編寫計算用戶的程序。讓用戶輸入起始數字,結束數字和要計數的數量。
這就是我想出了:
start = int(input("Enter the number to start off with:"))
end = int(input("Enter the number to end.:"))
count = int(input("Enter the number to count by:"))
for i in range(start, end, count):
print(i)
此輸入什麼也沒有發生,除了在此之後:
Enter the number to start off with:10
Enter the number to end.:10
Enter the number to count by:10
這很有道理。謝謝。 – adam