[Go] Add numbers concept exercise#480
Conversation
11bd262 to
bc53b47
Compare
tehsphinx
left a comment
There was a problem hiding this comment.
Thank you! Very good introduction!
Just some minor changes :)
Type conversion doesn't have an extra exercise planned for now, so this exercise is where it gets introduced.
Perfect! Different float types and usage are introduced more in-depth in a later exercise. |
bc53b47 to
e1637d3
Compare
|
@tehsphinx I've pushed another commit that changes the exercise to not require the use of conditionals. I still think that it is valid without this but when you get time if you could have a look at let me know what you think? 😄 |
|
On first glance it seems very simple now but maybe that is a good thing: We are after all introducing In the general flow of the exercises, this one makes more sense without |
Good call @tehsphinx , have added a paragraph explaining this a little bit and showing an example. Does this read OK? |
Yes, this looks good! |
61ba077 to
68012df
Compare
Nice one, I've updated this with the comments and have squashed the commits into one. |
iHiD
left a comment
There was a problem hiding this comment.
Nice :)
I think we need to slim the introduction down a bit else it'll feel like too much reading for someone doing the exercise, so I've made some comments about parts I'd move into hints or after.
This is based off of the C# exercise and slightly tweaked to work for Go. The conditional aspect of the exercise has been stubbed out to keep the exercise focussed on the core topic and have added more detail about Type Conversion in Go as is a required part of the exercise. Also added links to the Go Playground to the examples so students can play around and explore there if they want to.
68012df to
2d87d72
Compare
Thanks for the suggestions @iHiD, I've re-jigged the structure of the docs to not give too much away up front 😄 |

I've taken the approach outlined in the C# example but I'm not entirely confident that this is the correct approach for an intro exercise as it requires type conversion. This may be OK but I'd like to others opinions on it.
As Go has quite a few different numeric types, I've limited it to just
intandfloat64and given links in to the introduction if students want to dig in more.This satisfies #371