Goal: Continue practicing both foundational C# concepts, and test-driven development as you tackle increasingly complex programs and challenges!
Make a console application that takes a word and returns the Scrabble score for that word. Make sure to start with your specs, and that you include a README for this project and create a Git repository for it. Here are the values of letters in Scrabble:
A, E, I, O, U, L, N, R, S, T 1 D, G 2 B, C, M, P 3 F, H, V, W, Y 4 K 5 J, X 8 Q, Z 10
Create a console app that translates numbers in numeric form into written words. For example, it would translate 384 into "three hundred eighty four". Use multiple dictionaries to solve this.
Start small, and then get your code working for numbers up to 1 trillion.
Need I remind you to start with your specs and use TDD as you go? Make sure you include a README for this project and create a Git repository for it.
If you get this far, you've done great! Don't worry about getting to the rest of the projects by the end of the day.
Create a console app where a user enters a string, chooses a word in that string and provides a replacement for that word. Your method in action could look something like
FindAndReplace("Hello world", "world", "universe"). The result of which would be "Hello universe".
Do first: Write the method so that it replaces whole words only, as in the "hello world" example above. First, write your specs in english with an input/output example for each one. Then, one by one, create test methods for your english specs and make them pass.
Do second: Add to your method, so that your method takes into account partial matches. For example
FindAndReplace("I am walking my cat to the cathedral", "cat", "dog") would return the silly phrase "I am walking my dog to the doghedral."
Make sure to account for odd user inputs like all capitalization, partial capitalization, etc. Make sure you include a README for this project and create a Git repository for it.
Lesson 10 of 12
Last updated more than 3 months ago.