Ich versuche, den folgenden Python -Code für das Training < /p>
auszuführen#!/bin/python3
import os
import sys
#
# Complete the maximumDraws function below.
#
def maximumDraws(n):
return n+1
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
t = int(input())
for t_itr in range(t):
n = int(input())
result = maximumDraws(n)
fptr.write(str(result) + '\n')
fptr.close()
< /code>
, aber ich erhalte diese Fehlermeldung < /p>
Traceback (most recent call last):
File "maximumdraws.py", line 13, in
fptr = open(os.environ['OUTPUT_PATH'], 'w')
File "/home/inindekikral/anaconda3/lib/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'OUTPUT_PATH'
< /code>
Mein Betriebssystem ist Linux Mint 19 -Zimt.
Was muss ich tun? < /p>
Python KeyError: 'output_path' ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post