barbarer / py4e-int Goto Github PK
View Code? Open in Web Editor NEWPython for Everybody - Interactive
License: GNU General Public License v3.0
Python for Everybody - Interactive
License: GNU General Public License v3.0
I'm unsure whether it's a problem with Runestone's implementation of the text or a problem in the way that the Exercise sections are organized, but my students brought it to my attention that the Exercise sections don't contain a "Mark Complete" button and never register in the progress pages as Completed. They are always "never started," however they are recorded in the grade book.
https://runestone.academy/ns/books/published/UNDCS160-Spring2024-Python/files/userNames.html
In 8.6 I see 2 activities, which I completed. At the bottom it tells me I have completed 3 of 4 activities. This seems confusing. I ended going to the Chapter activity page to see what I wanted me to do, which shows 3 activities. Where is the 4th?
It doesn't seem obvious that I need to run the provided Answer solution after I fix the 5 errors in the Question code.
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
So I created a CSV file with my students names, using their student ID as their password. In retrospect maybe it should have been the same for everyone, but here we are.
I was grabbing info from several sources to get user names, email addresses, and student ids. I messed up the password/student id column so that most of the students had the wrong password - the id of the student "below" one or two rows in the spreadsheet. I'm thinking, no problem, I'll pay closer attention to the various columns of data, fix the spreadsheet, delete the students from the class and reload the CSV file.
On to the big problem. I removed the students from the class. I forgot that I can't add them in if they already exist in the system. If I could, I would go in and change the passwords manually (pain, but my fault), but I can't even do that. And I can't tell the students what their password is because I updated the file and I'm not 100% sure where I introduced the error.
Any suggestions for getting the passwords fixed and the students enrolled? Class starts next week, so I'd love to get this fixed sometime soonish. :-)
Thanks much for any suggestions.
Page: dictionariesandtuples.rst
.. activecode:: question10_4_3
The instructions are "Write code that will transform dictionary d into a list of tuples, called tup_list, sorted by the keys’ values in descending order." This page show sorting by keys not by values.
--> unit test is not sorted correctly (sorted by values, not keys)
def testOne(self):
self.assertEqual(tup_list, [('e', 30), ('c', 27), ('d', 15), ('a', 10), ('f', 3), ('b', 2)], "Checking to make sure the list was sorted correctly.")
should be
def testOne(self):
self.assertEqual(tup_list, [('f', 3), ('e', 30), ('d', 15), ('c', 27), ('b', 2), ('a', 10)], "Checking to make sure the list was sorted correctly.")
Instead of starting with all the mixed-up blocks on the left (top) move all the mixed-up blocks to the solution area (bottom) to start and then students can move just the distractor blocks to the top (source) and can more easily rearrange the correct blocks especially on a limited display device like a phone.
Please do not commit files in the build folder to github. It breaks the automated update.
Moving my CS1 course to Runestone and I'm going through all the chapters (through chapter 4 so far). I noticed a couple of things that seem like they should be addressed. My apologies if this has been posted somewhere and I missed it, or if this should be somewhere else.
1.5 shows the HTML tags for bold around print, where I assume you want print in bold. It does the same with one other word in the same window.
In the Chapter 2 mixup questions, it didn't seem obvious that the code was supposed to be exactly what was done in the Parsons problems. I love the flow from solving the algorithm to having to actually type out the solution, but it wasn't obvious that was the expectation. But, a lot of simple things are not obvious to me, so I might be the problem. :-)
In the Chapter 2 mixup questions, Activity 18, the expected text in the code is not the same as the text in the Parsons problem - "minutes" was added to the expected text. I'm worried that might confuse some of the students.
In 4.7.3 Q-4 the expected answer is "exception". The way I read it "exceptions" would be the answer, or "an exception" would work. Just grammar issues, but it took me a while to figure out what it wanted. I actually had to peek at the source. I wonder if the regex could make the ending s optional?
Love what I'm seeing. If I come across anything else I'll update this (if I can), or add a new entry.
Tom
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.