Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other typos/issues #159

Open
tstokke opened this issue Dec 21, 2023 · 0 comments
Open

Other typos/issues #159

tstokke opened this issue Dec 21, 2023 · 0 comments

Comments

@tstokke
Copy link

tstokke commented Dec 21, 2023

https://runestone.academy/ns/books/published/UNDCS160-Spring2024-Python/lists/listAsArgument.html

def deleting_first(lst):
lst = lst[1:]

The slice operator creates a new list called "t", but that will not affect the list it was passed.

Activity: 9.13.4 Multiple Choice (listArg_MC_slice)

I believe the variable in the message should be lst, not t

https://runestone.academy/ns/books/published/UNDCS160-Spring2024-Python/iterations/Exercises.html

Q-16: What will the following code print?

def mystery(nums):
total = 0
for num in nums:
if num == 999:
break
else:
total += num
return total

mystery([8, 2, 999, 5, 4])

print(mystery("walking")) #why is this line here, shouldn't the previous line be: print (mystery([8, 2, 999, 5, 4]), given that the expected answer is 10.

A. 1018
B. 1009
C. 19
D. 10

https://runestone.academy/ns/books/published/UNDCS160-Spring2024-Python/iterations/mixedupcode.html

In Parsons (itr_count_last2_muc) there is an if block that is missing a colon - I know, I'm being nit-picky :-)

https://runestone.academy/ns/books/published/UNDCS160-Spring2024-Python/lists/Exercises.html
Q-15: What will the following code print?

def mystery(num_list):
out = []
for i in range(len(num_list) - 1,0,-1):
num = num_list[i]
out.append(num)
return out

print(mystery([5, 10, 15, 20]))

out.append(num) is not properly aligned

@tstokke tstokke changed the title Another typo/issue Other typos/issues Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant