-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Numbers Concept Exercise]: Rethink/Redesign #2951
Comments
I was preparing to work on this. Commenting here for the ticket to be assigned |
This seems like an oddly specific learning objective and another example of over-complex math being introduced. In fact, the same goes for I appreciate they may be useful for some domains but I'd posit the teaching should be things that will benefit all python users and that almost all users will need at some point. |
Hi @mohmad-null 👋🏽 As clearly stated at the top of the description (emphasis mine):
The specs here were provided as a reference to the person who will be re-architecting the exercise, not a commandment nor set of debate points. I'll let @DjangoFett speak to the plans he has going forward (if he wants to do that), although he shouldn't feel that he has to. I am also going to ask you going forward to either PR a concept exercise for But I don't think having a debate about the utility of The author of this re-worked exercise may or may not include As for the Please also feel free to propose one or more practice exercises around topics you feel we haven't gotten to yet. |
By definition if the math is too complex then you will be creating exercises that are going to confuse and frustrate students who do not have that math. See also my comments in this thread: exercism/problem-specifications#1902 which are highly pertinent.
As noted in my other comment, I'd genuinely forgotten I'd raised the issues months previously; I wasn't being vexatious. The fact they came up again when another mentee did them 3 months later only re-enforces my point,
Sorry, but I don't know what that means. If you're saying "we don't want feedback at this point", then sure, I'll wait. |
Hi @mohmad-null, I'm submitting a couple exercises as a form of a/b testing. If you want to submit your own PRs as well, I'm super into it. The way I'm envisioning tackling complex / imaginary exercises are in a separate PR still related to this issue and simplifying the current arithmetic exercises (read: currency exchange). My plan is to borrow exercises from other languages that cover the same exercise and craft them for python. Most importantly I want to submit more than one exercise covering the same thing in order to foster a conversation about which one is possibly more effective. |
We don't want more of the same feedback on the existing exercise at this point, since @DjangoFett is re-designing it, and has also taken on thinking through multiple exercises with regards to numbers in Python. Hence the comment about updating design docs -- he may very well end up with design docs that split the topic into multiple concepts and topics. So do please either participate by PR-ing an additional exercise/exercises as he's welcomed above, or give him and others time to re-work things before launching a long discussion on how math or numbers should or should not be taught. Thanks. 🙂 |
This comment was marked as outdated.
This comment was marked as outdated.
Not Abandoned! Just slower than I'd like |
For shame, github bot! For shame. |
@DjangoFett - its been a bit and I know you have a LOT going on, so I am going to un-assign you from this task right now. I have another contributor who may take it on. However, I am more than happy to also have you work on it or collaborate - just let me know! And many thanks for all your efforts thus far. 😄 💙 🙏🏽 |
Bad Bot! Stop marking this abandoned. |
Nope. |
Stop it, stale bot! |
Hi everyone. I believe I am the perfect person to chime in here... specifically about the Currency Conversion exercise. I am a noobie who, like millions of other noobies, are struggling to learn to code. On the surface, it seems simple. Division, multiplication... a bit of addition and subtraction. But building the formulas was way more complicated than it should be due to the sheer AMOUNT of variables and functions required. I was at the point where I had no idea what to do with all these variables... or even what variables to create to get the job done. It. was. just. too. much. Too much for one exercise. I'm sure an experienced programmer would have this nailed in 5 minutes.... but I spent multiple days (about 5-6 hours total) working on this... only to end in failure and despair. I just caved in and looked at a solution. Totally defeated. This is not an issue with Python itself. Nor is it an issue with syntax. This was a problem with math. I know that coding is hard. Trust me, I get it. I know a person needs grit. But beginners need momentum and a sense of making progress. There is nothing more frustrating than running in circles and banging your head against the wall for days on end. Anyway, I know you guys are likely well aware of this, but I think that most people who create these coding challenges suffer from "The Curse of Knowledge." When you become really good at programming, you forget what it is like to be a beginner. Anyway, I was able to sharpen my problem solving skills with this one... so I will give it that. I just could not finish it on my own because it was too hard. Thanks for listening. |
This issue has been automatically marked as |
No, bot. |
Per issues #2946 , #2621 , #2835, #2804, #2591, and #2490 -- this exercise has gone through a lot of improvements and also complaints.
Since multiple re-works and improvements have not succeeded, we have decided a complete re-design of the
Numbers
exercise is in order.Concept docs can be retained, or revised as needed. Design documents should be updated.
Original specs for
Numbers
exercise are below:Goal
The goal of this exercise is to teach the basics of the
int
,float
, andcomplex
numeric types (numbers
) in Python.Learning objectives
int
,float
andcomplex
numbers in Pythonj
to represent the square root of -1. appendingj
to a number defines it as imaginary. (e.g.3j
is equivalent of3(sqrt(-1))
-- IF Pythons math module allowed negative square roots...it doesn't)..
) preceeded or followed by a number creates afloat
literalj
to anint
orfloat
(e.g. 3.4j or 5j)float
by casting anint
and anint
by casting afloat
, using theint()
andfloat()
constructors.int
andfloat
tocomplex
using thecomplex()
constructor.float
and animaginary
literal (e.g. 3.0 + 6j)float
, usinground(<float>, <digits>)
Out of scope
Infinity
andNaN
ints
math.floor()
andmath.ceiling()
sys.float_info
-- but maybe we should note these in passing, or link to them in links."1.032"
.Concepts
numbers
arithmetic operations
Prerequisites
basics
Resources to refer to
int()
built incomplex()
built infloat()
built inround()
Hints
Hints can link to the builtin function docs mentioned above, with appropriate prompts.
Concept Description
(a variant of this can be used for the
v3/languages/python/concepts/<concept>/about.md
doc and this exercisesintroduction.md
doc.)Python has three different types of built-in numbers: integers (
int
), floating-point (float
, and complex (complex
). Fractions (fractions.Fraction
) and Decimals (decimal.Decimal
) are also available via import from the standard library.Whole numbers (including hex, octals and binary numbers) without decimal places are identified as
ints
:Numbers containing a decimal point are identified as
floats
:Arithmetic
Python fully supports arithmetic between these different number types, and will convert narrower numbers to match their less narrow counterparts when used with binary arithmetic operators (
+
,-
,*
,/
, and%
).ints
are narrower thanfloats
, which are considered narrower thancomplex
. Comparisons between different number types behaves as as if the exact values of those numbers were being compared:All numbers (except complex) support the same general arithmetic operations, evaluated according to operator precedence.
Precision & Representation
Integers in Python have arbitrary precision -- the amount of digits is limited only by the available memory of the host system.
Floating point numbers are usually implemented using a
double
in C (15 decimal places of precision), but will vary in representation based on the host system. Complex numbers have areal
and animaginary
part, both of which are represented by floating point numbers.For a more detailed discussion of the issues and limitations of floating point arithmetic, take a look at The Python Tutorial.
Implementing
Tests should be written using
unittest.TestCase
, and the test file namednumbers_test.py
.Code in the
.meta/example.py
file should only use syntax & concepts introduced in this exercise or one of its prerequisites.Please do not use comprehensions, generator expressions, or other syntax not previously covered. Please also follow PEP8 guidelines.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
The text was updated successfully, but these errors were encountered: