runestoneinteractive / fopp Goto Github PK
View Code? Open in Web Editor NEWFoundations of Python Programming
Home Page: https://runestone.academy/runestone/static/fopp/index.html
Foundations of Python Programming
Home Page: https://runestone.academy/runestone/static/fopp/index.html
Describe the bug
A small thing but potentially confusing: in act_sac_1 on https://runestone.academy/runestone/static/fopp/Dictionaries/split_apply_combine.html, it says "Read the so_servey.csv file and produce a report". The name of the file is so_survey.csv.
Describe the bug
In Section 4.3, it says "The randrange function generates an integer between its lower and upper argument, using the same semantics as range — so the lower bound is included, but the upper bound is excluded." Unless I'm mistaken, at this point in the book the range command has never been used.
https://runestone.academy/runestone/static/fopp/PythonModules/Therandommodule.html
When running problem ac11_14_11 the following error is always displayed:
"An error occurred but it was outside of your code"
This issue was brought up by many students.
Describe the bug
Section 4.2 uses the word "namespace" twice, without explaining what it means; the word doesn't appear again until Chapter 19, and it doesn't appear that the term is ever really defined. I suggest adding text to Chapter 4 explaining what namespace means.
https://runestone.academy/runestone/static/fopp/PythonModules/intro-ModulesandGettingHelp.html
spd_ex_3q and ex_2_4 in the SimplePythonData chapter are asking about comparisons operators and logical opposite results. These should be moved to the Conditionals chapter where we introduce boolean expressions.
@laumurph adding you this way for now.
Describe the bug
Section 4.2 refers to "directory ~\Desktop\mycode"; I assume the backslashes should be slashes. (Unless this is meant to be DOS, but I don't think DOS has the ~ convention, does it?)
https://runestone.academy/runestone/static/fopp/PythonModules/intro-ModulesandGettingHelp.html
We want to make a page that gives advice for when to use keyword based parameter passing and when to not do so. Lauren can attempt to write the page with an outline. This was what was mentioned in the meeting:
When is it a good idea? Any time there’s more than about 3 parameters: it’s a good idea because it’s difficult to keep track of which values are going to which parameter names.
Reminder about using meaningful names for parameters: even more valuable when you use that name when calling the functions.
Change the file writing page to be much simpler, just showing that you can write a file with all the squared numbers from 1 to 12*12
Add a page describing the .csv format
Add a page describing how to read data in .csv format, manually (not with .csv module). Use olympics data that @bnmnetp will point you to, from a kaggle competition.
Add a page describing how to write data in .csv format, manually without using the .csv module. Base it on https://106w18.learningpython.today/runestone/static/UMSI106/StringFormatting/CSV.html. Use the olympics data again. Perhaps just extract a few of the fields to write to a smaller .csv file.
Describe the bug
An object of type EmptyImage doesn't support the getWidth() and getHeight() methods, returning an error.
To Reproduce
Steps to reproduce the behavior:
import image
img=image.EmptyImage(100,200)
print(img.getWidth())
ExternalError: TypeError: Cannot read property 'width' of undefined on line 3
is returned.Expected behavior
The number 100 should be returned.
Describe the bug
The textbook answer/autograder answer for seqmut-1-1 provides an incorrect answer, I believe. The answer should be, "Neither is the correct reference diagram," because the code
lst = ['mercury', 'venus', 'earth', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune', 'pluto']
lst.remove('pluto')
first_three = lst[:2]
results in first_three referring to the list [mercury, venus] (i.e. the first two items in the list, not the first three, because of the exclusive nature of the right edge of the slice operator).
Perhaps the code should be changed to "first_three = lst[:3]"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I believe the correct answer to this question is, "Neither is the correct reference diagram."
Desktop (please complete the following information):
Javascript Console
No errors.
Describe the bug
For example, when I search for turtle.write
in the textbook, it returns pages that include the words turtle
and write
.
To Reproduce
Steps to reproduce the behavior:
turtle.write
or "turtle.write"
Expected behavior
Only pages which include "turtle.write" together (including the dot) should appear.
In 7.8.1, there is a list of colors and their corresponding RGB codes, but it would be a good idea to show the students what those colors actually look like. There are many types of blue, for instance, and I suspect only programmers and graphic designers know what "cyan" or "magenta" are.
For consistency the section should be Exercises not Dictionary Exercises
combine extra exercsies with exercises
Now that we're teaching with, we might as well just teach that recipe.
Describe the bug
In the early going of the semester a lot of students (and professors) are having a really hard time getting this right. Its pretty long and complicated for so early in the semester.
I added a showeval
of a somewhat simpler problem, which I apologize for pushing directly to master @presnick and @laumurph . If you hate it we can always make a new PR to change it.
I think having the showeval first will probably alleviate some of the pressure on this one, but I also wondered if this was moved here from a much later chapter.
I'm also thinking that the following example would be good to add to this section:
>>> v1 += 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'v1' is not defined
>>> def foo():
... v1 += 1
...
>>> foo()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in foo
UnboundLocalError: local variable 'v1' referenced before assignment
Notice the different error messages! Subtle, but it really illustrates an important local variable concept.
Local variables are created at the same time the local namespace is created. That is ANY variable that is assigned to anywhere in the function gets added to the local namespace immediately but it will remain UNBOUND until the assignment statement is executed.
I think we ought to move Conditionals in front of SequenceMutation
Then we can re-use many more practice problems from the Lists and Strings chapters of thinkcspy. We will need to reword them so they are not asking for a function but there are a lot of them.
Describe the bug
Problem (ac8_11_3) says "Starting with the list of the previous exercise, write Python statements to do the following:" But the list in the previous example is a set of course names.
Also, ac8_11_3 has a tab labelled "Answer" and one "Discussion", which none of the others do.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The initial list should be provided explicitly, and the Answer tab should be removed.
ac8_11_6 will require that the students use an if statement. Conditionals are not introduced until the next chapter. Move this exercise to conditionals
Describe the bug
Section 6.5 includes sequences-5-3 under Check Your Understanding which uses a slice; however, slices aren't introduced until the next section.
https://runestone.academy/runestone/static/fopp/Sequences/Length.html
Describe the bug
This is a new bug I've run into in the past day or two. When I am in the Grading tab and press the Run button on a coding example, nothing happens. An error (below) appears in the Javascript console.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The code should run.
Desktop (please complete the following information):
Javascript Console
activecode.js:932 Uncaught TypeError: Cannot read property 'editor' of undefined
at ActiveCode.buildProg (activecode.js:932)
at ActiveCode.runProg (activecode.js:983)
at HTMLButtonElement.dispatch (jquery-1.10.2.min.js:5)
at HTMLButtonElement.v.handle (jquery-1.10.2.min.js:5)
ActiveCode.buildProg @ activecode.js:932
ActiveCode.runProg @ activecode.js:983
dispatch @ jquery-1.10.2.min.js:5
v.handle @ jquery-1.10.2.min.js:5
Steps to reproduce:
Incorrect variable name when Parsons problem is loaded (?)
Describe the bug
Section 9.18 says "Here is another pretty standard filter for photos called “Sepia tone” It will remind you of the old-west photographer style images. The formula to convert a photo into sepia tone is as follows:" but then there is no formula.
To Reproduce
Steps to reproduce the behavior:
Describe the bug
In the ActiveCode box, hitting "Run" without adding code to the program causes a popup to appear that won't exit when "Cancel" is clicked. In Firefox, ticking the "Prevent this page from creating additional dialogs” box and clicking "OK" will make the dialogue box disappear, but then the "Run" button becomes greyed out and a “a web page is slowing down your browser” warning appears. In Chrome, there is no such box to tick and it is impossible to exit the dialogue box.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When the dialogue box appears, clicking "Cancel" cases the box to disappear.
Desktop (please complete the following information):
-Windows 10, version 1803
-Firefox 62
-Chrome 69
Describe the bug
I assign reading by chapter number and section number; it would be convenient if chapters were referred to by number AND title everywhere.
To Reproduce
Steps to reproduce the behavior:
Visit https://runestone.academy/runestone/dashboard/index?chapter=Iteration
Click on "Select Chapter", and note the lack of numbers.
Look under "Overall Progression" and note the section names are not numbered.
Choose "Chapter" from the first menu.
See that the names of the chapters appear (in random order!) but the numbers do not.
Click on "Readings" to open it up.
Note the lack of chapter numbers and section numbers that are listed below.
Describe the bug
For some multiple-choice questions, the only indicator that the student may move on or not is a green or red-colored box, which is potentially problematic for color-blind users.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect some other indication that the answer is correct or that the student may move on. A symbol, some text like "Correct" or "Proceed", or whatever is most appropriate.
Describe the bug
Box act_monte_6 in 10.17, which should be a place for code, contains markdown text instead.
To Reproduce
Steps to reproduce the behavior:
update these exercises so the instructions are inside the directive.
ee_exceptions_011 has an old-style print statement
Describe the bug
A typo or omission in the definition of "covariance". The sentence which begins, "Covariance measures the the larger values of one variable correspond to the larger values of a second variable..."
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I suspect there is just a phrase missing, in the place of "the the," which would clarify the definition.
Desktop (please complete the following information):
Javascript Console
No JS errors
Describe the bug
In Section 6.5, much is made about how one can find the last character of a string, saying,
Typically, a Python programmer will access the last character by combining the two lines of code from above.
lastch = fruit[len(fruit)-1]
However, in previous sections we have already seen that we can get the last character by typing fruit[-1]
. A reader may be confused, wondering what is wrong with negative indexing that this section tells them that "a Python programmer" wouldn't even use it. I think the artificiality of the example should be acknowledged.
A possible non-redundant use of the len function would be to find the character in the middle of the string. e.g. if fruit="grape"
then fruit[len(fruit)//2]
returns "a".
Describe the bug
The code in assess_ac23_5_2 always gives an error.
To Reproduce
Change "4" to a "2"
This can be renamed
Several of the exercises I mentioned in #62 can be used here as boolean function exercises
Describe the bug
https://runestone.academy/runestone/static/adrian_ac101f18/Files/monte_carlo_simulations.html
Describe the bug
The file
https://runestone.academy/runestone/static/adrian_ac101f18/TransformingSequences/luther.jpg,
which is sought in act_ip_4 in section 9.18.
To Reproduce
Steps to reproduce the behavior:
Feature Request
Please put a copy of the "Gradebook" button on the Grading tab in the Instructor's View. Don't remove it from Student Progress, though.
Why?
Describe the bug
In Sec 10.17 "Monte Carlo Simulations," ActiveCode box #6 (act_monte_6), the prose text and partial description of the problem statement is appearing within the ActiveCode box and not above it.
https://runestone.academy/runestone/static/heidelberg_ac101f18/Files/monte_carlo_simulations.html
It seems like this text should actually be part of the prompt that accompanies ActiveCode #7 (below it).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The prose should appear above the ActiveCode box, as it seems to be the prompt for the reader.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Javascript Console
Please check the javascript console for any error messages and include them here.
When I read that title I thought the section was going to be about non-stable sorting. Perhaps it would be clearer to title the section Stable Sorting breaks ties predictably ??
Describe the bug
When I'm using Instructor's mode, I often have several tabs open pointing to Grading, the Gradebook, etc. Unfortunately, all the tabs look exactly the same; they are all titled "Runestone Interactive". It would be great if the <title>
of each page would be different, at least on the administrative side of things, like Gradebook - Runestone Interactive
. (Although I suppose students might want to have multiple tabs open as well, if they are working on one project but referring back to a previous chapter for reference.)
Section 7.6 (re)introduces the range command, but it would be nice if the students could get an example of what the range function returns. A code window with lines like
print(range(10))
print(list(range(10))
print(list(range(11))
print(list(range(1,11))
https://runestone.academy/runestone/static/fopp/Iteration/TheAccumulatorPattern.html
ex8_12_1 and ex8_12_2 are duplicates of exercises from Iteration
ex8_12_3 should be moved to the sequences chapter as long as we intend for them to solve the palindrome by first reversing the string and then comparing the original to the reversed. Otherwise it should be moved to conditionals
The exercises mention several data files -- where can the students view those?
Describe the bug
In Section 5.6, right below ac_3_7_1, there's a line that says "The list of integers printed above for list(range(5,60,2)) is only displayed to show you the distances being used to move the turtle forward. The actual use appears as part of the for loop." That doesn't make sense in the context of the page; the command "list(range(5,60,2))" doesn't appear anywhere else.
Describe the bug
When I submit code for act_rot13_ac_1, one of the tests has the Note "you need a loan_total variable".
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Javascript Console
Please check the javascript console for any error messages and include them here.
I'm not sure where this should go but we should either add more content or absorb 14.1 into 15 after we introduce modules so the imports hint makes a little more sense.
Describe the bug
The circle graphs for the different problems are displayed in (as far as I can tell) completely random order, which is very frustrating and makes it hard to correlate with the Overall Progression bar graphs above it. If at all possible, please sort the circle graphs in order of appearance in the book, or at least alphabetically.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
That the circles be listed in order of appearance in the textbook, preferably left-to-right and then top-to-bottom, but the reverse if necessary.
Bonus feature suggestion
Give the user the ability to sort the circles alphabetically, by appearance, by completion percentage, and so forth.
Describe the bug
The CodeLens example on Section 7.3 appears to be using Python2 to evaluate the print statements, outputting tuples instead of strings.
To Reproduce
Steps to reproduce the behavior:
('Hi ', 'Joe', ' Please come to my party on Saturday!')
Expected behavior
It should say Hi Joe Please come to my party on Saturday!
Secondly, I think in the first few chapters we should be intentional about adding a few more parsons problems. Maybe added to the Exercises subchapter. Barb's work shows that these are effective, yet we don't have a lot of them that could be assigned as homework.
for example in Simple Python Data chapter we could add a few questions similar to the compute the area of an X or compute mpg and make parsons problems that demonstrate simple input, compute, output pattern.
Also adding some simple ones on iteration and conditionals
From thinkcspy we can adapt the wording to remove the requirement to write a function and include the following exercises:
ex_6_6, ex_6_7, ex_6_8, ex_6_10, ex_6_13
Note: I think its perfectly fine if some or all of these are used in the functions chapter later.
Check the workding for ex_6_12 agains the leap year question already in this chapter and use the one that is the most clear.
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.