-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
In 16-writing-functions, print_date example needs revising #538
Comments
Excellent point, thank you for raising it! |
One suggestion with Order of Operations, I think it might be clearer for students looking through this to have multiple examples to work with. The print_date is probably okay to work with but I would recommend something a bit shorter to go alongside. One thing that might be useful would be to have another full example of a function definition, like @ognancy4life suggested, but using mathematical expressions. This way, it's short, with hopefully pretty transparent functionality and that way, it doesn't really get in the way of the bigger issue of order of operations in a Python script. In addition, an example like this might make explaining exactly what went wrong and why a lot easier. That could even be a good lead-in to the print_date order of operations example. A good example for a simpler order of operations example might be something like this:
|
My PR (#546) was an effort to change this with the minimal edits. The example @AlexT97 provides would certainly work, and might be superior in that there would be less to type in if a student tries to do so. I guess the question is which additional concepts would be less confusing: using parentheses to order mathematical operations, or string building? I don't know. :) |
As suggested in #538, the function print_date was previously defined. This updated question will use print_time instead.
As suggested in #538, the function print_date was previously defined. This updated question will use print_time instead.
In lesson 16: Writing Functions, there is a question regarding "Order of Operations" using the print_date function. This is a good question, but because print_date has already been defined earlier in the lesson, the students will not get the desired error. I recommend using a different example function here to teach order of operations. Thank you!
The text was updated successfully, but these errors were encountered: