Great job! You just learned about how to work with textual data in a few different ways:
- How to save char and string values to a variable.
- Use the addition symbol (
+) to concatenate strings.
- Interpolate strings for easier string construction.
- Find information about a string using
- Grab characters and parts of strings using bracket notation and
- Use built-in methods such as
.ToLower()to manipulate strings.
Now use what you’ve learned to write a short program! Some ideas:
- Write a program that randomly converts part of a text to uppercase and lowercase to look like randomcase.
- Write a program that takes in a series of random words to construct an automated poem, in the style of e.e. cummings.
Time for some practice! Use the code editor to play around with what you learned in this lesson. If you’re not sure what to do, try one of the extensions above!
Take this course for free