Friday, February 14, 2014

Weekly Reflection #3

This week in this chapter I learned how to deal with text, so I could start making programs that users can run and interact with. In programming what we call text is strings. Just like numbers, you can also store values into strings like so.















When typing strings you have to put them in single quotes, like I'd shown above in the screenshot. The single quotes are really only there to tell the computer where the string begins and ends. The single strings are not a part of the string's value(it's just hello when printed, not 'hello'). Strings can have almost any keyboard character in them except for single quotes.
String Concatenation
You can add strings together using the + operator which is called string concatenation.













The + operator works differently on strings and integers because they are different data types('Hello' is a string, 5 is an integer).

After going over those two things, this chapter goes into writing programs in IDLE's file editor.
Idle's file editor
The book came with some instructional programs I had to follow which was pretty much this(explaining IDLE gives different instruction colors).














No comments:

Post a Comment