Tutor profile: Ben B.
Subject: Python Programming
How do I change a whole string to uppercase in Python?
Python is a very intuitive language for string comprehension. It has a number of built-in methods that makes tasks like this a snap. Variables defined as as strings can be made uppercase easily: x = "Hello!" x.upper() Running x.upper will return "HELLO!" This is also the case if one runs the following: "Hello!".upper()
What is a comma splice, and how do I fix them?
This is a comma splice: "I took the trash out on Tuesday, it was very rainy that day." Notice how two grammatically complete sentences — that is, two complete thoughts — are joined by a comma. The correct way to write this sentence is as follows: "I took the trash out on Tuesday. It was very rainy that day." Notice how much cleaner this version feels! The first one sounds awkward and amateurish, like a text message. The second one feels professional and clean.