Difference between revisions of "Values, Types, and Variables Identification assignment"
From WLCS
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Directions:''' | '''Directions:''' | ||
− | + | <!-- | |
− | # Open a text editor | + | # Open a text editor |
+ | --> | ||
+ | # Open up a new document in Google Docs | ||
# Put your name at the top | # Put your name at the top | ||
− | # | + | # Put your Period # under your name |
+ | # Title the file as '''Values, Types, and Variables''' | ||
# Complete the exercises below in this file | # Complete the exercises below in this file | ||
# Be sure to number each of your answers!! | # Be sure to number each of your answers!! | ||
+ | # Submit your assignment via [http://classroom.google.com Google Classroom] | ||
− | '''Exercises:''' | + | '''Value Exercises:''' |
* Identify next to each of the numbered items below whether or not it is a value or a variable | * Identify next to each of the numbered items below whether or not it is a value or a variable | ||
** If the item is a value, then identify its type (int, string, float) | ** If the item is a value, then identify its type (int, string, float) | ||
− | + | * Examples: | |
− | Examples: | + | ** 5 = value (int) |
− | + | ** x = variable | |
− | 5 = value (int) | ||
− | x = variable | ||
# 3 | # 3 | ||
Line 27: | Line 29: | ||
# 1.0 | # 1.0 | ||
+ | '''Variable Naming Rules:''' | ||
+ | # Can only be comprised of letters (a-z,A-Z), numbers (0-9), and underscore (_) | ||
+ | # Cannot start with a number | ||
+ | # Cannot be a reserved word in the language | ||
+ | # No spaces | ||
+ | |||
+ | '''Variable Naming Exercises:''' | ||
* Identify next to each of the variable names whether or not the name is VALID or INVALID | * Identify next to each of the variable names whether or not the name is VALID or INVALID | ||
Line 41: | Line 50: | ||
'''Submit:''' | '''Submit:''' | ||
− | * Submit | + | * Submit your assignment via [http://classroom.google.com Google Classroom] |
Latest revision as of 09:23, 12 September 2014
Directions:
- Open up a new document in Google Docs
- Put your name at the top
- Put your Period # under your name
- Title the file as Values, Types, and Variables
- Complete the exercises below in this file
- Be sure to number each of your answers!!
- Submit your assignment via Google Classroom
Value Exercises:
- Identify next to each of the numbered items below whether or not it is a value or a variable
- If the item is a value, then identify its type (int, string, float)
- Examples:
- 5 = value (int)
- x = variable
- 3
- hello
- "bob"
- 8
- "9"
- 2.5
- generals
- 1337
- "l33t"
- 1.0
Variable Naming Rules:
- Can only be comprised of letters (a-z,A-Z), numbers (0-9), and underscore (_)
- Cannot start with a number
- Cannot be a reserved word in the language
- No spaces
Variable Naming Exercises:
- Identify next to each of the variable names whether or not the name is VALID or INVALID
- x
- xyz
- 2x
- x!
- x2
- this_is_a_long_variable_name
- hello world
- washington-lee
- bobobobob
- 429
Submit:
- Submit your assignment via Google Classroom