Code returning a different result on runestone vs local
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the pythonds course's GettingStartedwithData page and reproduce the provided snippet in Runestone and a local Python REPL. Compare the execution context and displayed output; done means the page produces the expected Python behavior or clearly explains any intentional difference.
Written by the indexing model from the issue text.
Description
Error reported in course pythonds on page GettingStartedwithData by user UPS umongia@gmail.com
In the following code when we print(A) after changing the element in myList - A shows the new value whereas if I run the same code on my local or an online REPL, it prints the same value as before for A
myList = [1,2,3,4]
A = [myList]*3
print(A)
myList[2]=45
print(A)
Output in runestone: [[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]
[[1, 2, 45, 4], [1, 2, 45, 4], [1, 2, 45, 4]]
Output in local: [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
- Dominant language
- Python
- Stars
- 273
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RunestoneInteractive/pythonds
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
RunestoneInteractive/pythonds#109 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
RunestoneInteractive/pythonds#126 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 52/100
RunestoneInteractive/pythonds#120 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
RunestoneInteractive/pythonds#103 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
RunestoneInteractive/pythonds#99 · 5 comments · 1 reaction ·
All issues in RunestoneInteractive/pythonds
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·