Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
luiluilui
ai-student-workspace
Commits
84b631b4
Commit
84b631b4
authored
May 04, 2022
by
Leonard Engmann
Browse files
Describe your commit here
parent
9a4a2fcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
00/solution_00.py
View file @
84b631b4
from
module_1
import
is_positive
,
is_even
from
module_1
import
is_positive
,
is_even
def
is_even_and_positive
(
x
):
def
is_even_and_positive
(
x
):
"""
"""
Please modify the body of this function so that it returns
Please modify the body of this function so that it returns
- True if `x` is an even and positive integer
- True if `x` is an even and positive integer
- False in all other cases
- False in all other cases
"""
"""
if
is_positive
(
x
)
==
True
and
is_even
(
x
)
==
True
:
return
True
else
:
return
False
# This function body should be edited such that
# This function body should be edited such that
# it contains the correct solution
# it contains the correct solution
raise
NotImplementedError
#
raise NotImplementedError
# one possibility would be to use the functions
# one possibility would be to use the functions
# provided by module_1
# provided by module_1
# return is_even(x) and is_positive(x)
# return is_even(x) and is_positive(x)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment