Category: Instructor
Posts from Ken.
Quiz 05
Weekly Quiz
Write your code for the quiz, then:
- email your answers (as file attachments) to Ken.
- Most important: blog about your answers. You should explain the code, your process and link to code on GitHub.
Mondays – Week 08
The Video
Quiz 04
Weekly Quiz
Write your code for the quiz, then:
- email your answers (as file attachments) to Ken.
- Most important: blog about your answers. You should explain the code, your process and link to code on GitHub.
Mondays – Week 07
The Video
WSQ 11 – Yo Soy 196
Background
Lychrel numbers are natural numbers that do not form a palindrome after successive additions to their inverse. See details on Wikipedia: http://en.wikipedia.org/wiki/Lychrel_number
What to Do
Your jobs is to create a program that asks the user for two pieces of data:
- The lower bound of the sequence
- The upper bound of the sequence
Details
- The range of numbers analysed (lower to upper bound)
- The number of natural palindromes (no addition to inverse needed)
- The number of non-Lycherels encountered (become palindromes)
- The number of Lycherel number candidates (that did not converge to palindrome)
Since you will not be able to prove that a number is Lycherel (since you cannot computer forever to check), our definition for a Lycherel candidate will be if a number does not converge after 30 iterations of applying the addition to the inverse.
Hey Ken, my numbers are too small in C++
C++ programmers will want to use a library to support big numbers. I recommend using the C++ Big Integer Library.
I also made a video about this library and you can see it here
Videos about YoSoy196
and if you are interested in getting colours on the terminal:
What to Submit
As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag #WSQ11 on your post so our blog hub picks that up.
You should include your code as a link to GitHub. You really should start using your GitHub repository now. If you need help on that, just ask Ken or your classmates.
And of course, leave any questions here as well as asking those questions on Twitter with the hashtag #TC101 so we all see your question posted there.
WSQ10 – Lists
What to Do
Create a program that asks the user for 10 numbers (floating point). Store those numbers in a list. Show to the user the total, average and standard deviation of those numbers.
Details
For the Python group, you want to be using Lists. For the C++ group you can do this with arrays or Vectors, but you will need to know eventually how to do both.
Once you have this working, change it so that users keep giving you values until they signal “no more values”. How would you implement this and in particular for the C++ group, how to you deal with an unknown size to your array during compilation?
What to Submit
As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag WSQ10 on your post so our blog hub picks that up.
You should include your code as a link to GitHub. You really should start using your GitHub repository now. If you need help on that, just ask Ken or your classmates.
If you have not seen my video yet about the GUI tutorial for GitHub, go check that out: http://youtu.be/YQmlksGFZWY
And of course, leave any questions here as well as asking those questions on Twitter with the hashtag #TC101 so we all see your question posted there.
Mondays – Week 06
Monday Morning Video
Reminder that the “expected” point to be at the end of Partial#1 (February 19) is #WSQ08. See the video for more details and what that means.
Mondays – Week 05
Monday Morning Video
Reminder that the “expected” point to be at the end of Partial#1 (February 19) is #WSQ08. See the video for more details and what that means.
Quiz 03
Weekly Quiz
Write your code for the quiz, then:
- email your answers (as file attachments) to Ken.
- blog about your answers. You should explain the code, your process and link to code on GitHub.