mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[IFT] Adjust debug lesson for Python 2.7
GitOrigin-RevId: 8362390b6dead28e8c25a77012f3f9b46f003b9c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0d2e309105
commit
48978184b0
+3
-3
@@ -7,7 +7,7 @@ object PythonRunLessonsUtils {
|
||||
const val demoConfigurationName = "sandbox"
|
||||
|
||||
val demoSample = parseLessonSample("""
|
||||
def find_average(value: list):
|
||||
def find_average(value):
|
||||
check_input(value)
|
||||
result = 0
|
||||
for s in value:
|
||||
@@ -23,12 +23,12 @@ object PythonRunLessonsUtils {
|
||||
return int(<select id=2>s.split()[0]</select>)
|
||||
|
||||
|
||||
def check_input(value: list):
|
||||
def check_input(value):
|
||||
if (value is None) or (len(value) == 0):
|
||||
raise ValueError(value)
|
||||
|
||||
|
||||
def remove_quotes(s: str):
|
||||
def remove_quotes(s):
|
||||
if len(s) > 1 and s[0] == "'" and s[-1] == "'":
|
||||
return s[1:-1]
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user