Skip to content
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

Add else statements to True and False Execise #221

Closed
mbdunn opened this issue Jun 19, 2019 · 2 comments · Fixed by #245
Closed

Add else statements to True and False Execise #221

mbdunn opened this issue Jun 19, 2019 · 2 comments · Fixed by #245
Labels
good first issue Good issue for first-time contributors help wanted Looking for Contributors

Comments

@mbdunn
Copy link

mbdunn commented Jun 19, 2019

The True and False Statements exercise in the Making Choices lesson would be more clear with some else statements to display the results when the value is considered false.
For example:
if [ ]
disp('empty is true')
else
disp('empty array is false')
end

Also, when learning I found the use of "foo" everywhere in examples confusing and frustrating, using a word that means something to people might make it more accessible.

@gcapes
Copy link
Contributor

gcapes commented Jun 20, 2019

Thanks for the ideas @mbdunn!
A PR with some else statements would be welcome!

I don't feel too strongly either way about 'foo'. We only have one example of it in this lesson, but it is widely used in programming as a meaningless placeholder for variable and function names, strings etc, precisely because it holds no meaning. See here for further info https://en.wikipedia.org/wiki/Foobar

@mbdunn
Copy link
Author

mbdunn commented Jun 26, 2019

Great thanks! I'll give the PR thing a try.

Good point. I guess giving a bit of background and introducing it while teaching would help because it will be everywhere when they need to look stuff up for themselves after.

@gcapes gcapes added good first issue Good issue for first-time contributors help wanted Looking for Contributors labels Apr 17, 2020
egrabke added a commit to egrabke/matlab-novice-inflammation that referenced this issue May 3, 2022
zkamvar pushed a commit that referenced this issue Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for first-time contributors help wanted Looking for Contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants