Create an example for each method. When would this be useful?
Variable Names
In this list of variable names, which ones are legal?
76trombones = "big parade"
more$ = 1000000
class = "Computer Science 101"
Price_of_tea_in_china
my name = "Scooby Doo"
A_good_grade_is_A+
Which ones are technically legal, but generally frowned upon, and how could we make these better?
Family
Create three variables:
One called family_name that points to the family's name (make that a string maybe?).
One called family_count that stores the number of members in your family.
One called family_age that stores the average age of your family.
Then print the following:
"Our family name is ___. We have ___ members and we are, on average, ___ years old."
Note: you can use your housemates or family of friends for this challenge.
Optional, Extension Challenge
You are given two positive integers, a and b, which each correspond to the sides of a right-angle triangle. Print the integer value corresponding to the square of the hypotenuse, c^2, of that right triangle. That is, given sides a and b, print c^2
Hint: if a = 3 and b = 5, then the answer is 34. Do the same for a = 2 and b = 6.
Final Quiz
Time to test your memory!
To participate in the quiz, join here: https://joinmyquiz.com and enter the game code provided by your trainer.