Quick Advice
Hello There,
So if you ever need to quickly get a sentence in title case, here is an idea.
open up python and do this:
Sentence = “this is a sentence“
Of course the name could be anything. If you want you could name it something like ice_cream_with_waffles:
ice_cream_with_waffles = “this is a sentence“.
then do:
Sentence.title()so the full code would look like this:
ice_cream_with_waffles = "this is a sentence"
ice_cream_with_waffles.title()you can also use other adjectives/modifiers
so Sentence.upper() = THIS IS A SENTENCE
I would recommend you play around with it to get a feel for how the python language works😀
python is wonderful. you can use it to help you learn languages.
Here is a simple concept in programming: if statements.
lets say you are a student. you can tell python to tell you a certain phrase if you received a particular grade.
you can say:
# specify what grade equals or else the computer wont be able to tell you anything......
grade = 100
if grade == 100:
print("wonderful")
else:
print("did you study?")now this only looks at if the grade is the number. so check this out:
grade = 100
if grade == 80: # "==" means check if It equals the number. >= means if the number is equal to or more than
print("wonderful")
else:
print("did you study?")in this new example. the student got 100%. they did perfectly on the test however, the computer program did not say wonderful, it asked if the student had studied.
When I was younger I had a teacher that reminded the class that while calculators are great, they only work if you put the correct numbers in. This is a similar principle
think of the computer program as a robot……… 😆
the computer will do what ever you ask It to, absolutely perfectly. it will do math for you. it will draw frogs for you. (its the turtle package, its pretty fun). but you have to give it the right instructions.
so, the solution here is:
grade = 100
if grade >= 80:
print("wonderful")
else:
print("did you study?")
# you may prefer to use R. here is a code in R syntax ------
## load in the number -------
grade = 100
## run "logic test". the number either is or isn't......----------
ifelse(grade >= 80, "wonderful", "did you study")this python script says: if the grade is equal to or more 80. say wonderful. if not then ask if I studied.
More Complicated Example
Let’s say you are building a guitar.
An example of what you could use python for is:
# Check if the guitar neck is straight enough
if neck_deviation < 0.5:
print("Neck straightness is just right.")
elif neck_deviation < 1.0:
print("Neck is acceptable but consider adjusting the truss rod.")
else:
print("Neck is too curved. Adjust the truss rod before continuing.")
neck_deviation = 0.7 This is by no means the only way you can use python to help you with guitar building. I would encourage anyone to look at their situation and see how they can use python.

