
item | description |
---|---|
Autograded Score | 5 out of 5 (100.0%) |
Autograded Test Cases | Passed 2 out of 2 cases |
Pending Test Cases | ⌛ 1 item worth a total of 5 points require manual grading |
Total Available Points | 10 |
Filename | sample-submission-01.ipynb |
Autograder Finished At | 2025-03-19 06:49 PM UTC |
Autograder Duration | 0.02 seconds |
Test Cases Checksum | ea8037ca2aedc3c33ec7227962cc2464 |
Submission File Checksum | c98c747e12a0456033956759c9daf7a0 |
Autograder Python Version | Python 3.12.5 |
Autograder Platform | Windows-11-10.0.26100-SP0 |
Jupygrader Version | 0.1.6 |
Test cases result
test_case_name | learner_score | max_score | did_pass | message | |
---|---|---|---|---|---|
0 | calculate-odd-sum | 2 | 2 | ✔️ Pass | |
1 | calculate-odd-product | 3 | 3 | ✔️ Pass | |
2 | python-discussion | nan | 5 | ⌛ Requires manual grading |
Challenge 1 ¶
Calculate the sum of odd numbers in
my_list1
and store it to a new variable named
odd_sum
.
In [2]:
my_list1 = [1, 2, 3, 4, 5]
# YOUR CODE BEGINS
odd_sum = 0
for x in my_list1:
if x % 2 != 0:
odd_sum += x
# YOUR CODE ENDS
In [3]:
# Code Generated by Jupygrader
try:
_did_pass = True
_message = ''
_test_case = "calculate-odd-sum"
_points = 2
assert odd_sum == 9
except BaseException as ex:
_did_pass = False
_message = type(ex).__name__ + ': ' + str(ex)
raise
finally:
_record_test_case(_test_case, _did_pass, _points, _message)
Challenge 2 ¶
Calculate the product of all odd numbers in
my_list2
and store the result in a new variable named
odd_product
.
In [4]:
my_list2 = [1, 2, 3, 4, 5]
# YOUR CODE BEGINS
odd_product = 1
for x in my_list2:
if x % 2 != 0:
odd_product *= x
# YOUR CODE ENDS
In [5]:
# Code Generated by Jupygrader
try:
_did_pass = True
_message = ''
_test_case = "calculate-odd-product"
_points = 3
assert odd_product == 15
except BaseException as ex:
_did_pass = False
_message = type(ex).__name__ + ': ' + str(ex)
raise
finally:
_record_test_case(_test_case, _did_pass, _points, _message)
Challenge 3 (Manually Graded) ¶
In a markdown cell, discuss why Python is an easy language for beginners to learn.
- Python's syntax is close to natural language, making it easier to understand.
- No need to compile before running the code; you can execute scripts directly.
- Python has a built-in library for everything from handling files to web development.
In [6]:
# Code Generated by Jupygrader
_did_pass = None
_message = ''
_test_case = "python-discussion"
_points = 5
_grade_manually = True
_record_test_case(_test_case, _did_pass, _points, _message, _grade_manually)