Spaces:
Sleeping
Sleeping
Correcting language name
Browse files
utils.py
CHANGED
|
@@ -25,22 +25,22 @@ def execute_code(code: str, stdin: str = "", language: str = "cpp") -> Tuple[str
|
|
| 25 |
Currently supports: python (default). Other languages scaffolded.
|
| 26 |
"""
|
| 27 |
try:
|
| 28 |
-
if language == "
|
| 29 |
return _execute_python(code, stdin)
|
| 30 |
|
| 31 |
-
elif language == "
|
| 32 |
return _execute_c(code, stdin)
|
| 33 |
|
| 34 |
-
elif language == "
|
| 35 |
return _execute_cpp(code, stdin)
|
| 36 |
|
| 37 |
-
elif language == "
|
| 38 |
return _execute_java(code, stdin)
|
| 39 |
|
| 40 |
-
elif language == "
|
| 41 |
return _execute_javascript(code, stdin)
|
| 42 |
|
| 43 |
-
elif language == "
|
| 44 |
return _execute_csharp(code, stdin)
|
| 45 |
|
| 46 |
else:
|
|
|
|
| 25 |
Currently supports: python (default). Other languages scaffolded.
|
| 26 |
"""
|
| 27 |
try:
|
| 28 |
+
if language == "Python":
|
| 29 |
return _execute_python(code, stdin)
|
| 30 |
|
| 31 |
+
elif language == "C":
|
| 32 |
return _execute_c(code, stdin)
|
| 33 |
|
| 34 |
+
elif language == "C++":
|
| 35 |
return _execute_cpp(code, stdin)
|
| 36 |
|
| 37 |
+
elif language == "Java":
|
| 38 |
return _execute_java(code, stdin)
|
| 39 |
|
| 40 |
+
elif language == "Javascript":
|
| 41 |
return _execute_javascript(code, stdin)
|
| 42 |
|
| 43 |
+
elif language == "C#":
|
| 44 |
return _execute_csharp(code, stdin)
|
| 45 |
|
| 46 |
else:
|