Complete the code to assign the value 10 to a local variable named count.
count = [1]The local variable count is assigned the integer value 10. Using quotes would make it a string, and variable names are case-sensitive.
Complete the code to print the value of the local variable named total.
total = 25 puts [1]
Variable names are case-sensitive. The local variable is total in lowercase, so we use total to print its value.
Fix the error in the code by completing the variable name correctly.
user_name = "Alice" puts [1]
The variable is named user_name with an underscore and all lowercase letters. Ruby is case-sensitive and exact with variable names.
Fill both blanks to create a local variable named age and assign it the value 30.
[1] = [2]
The local variable age is assigned the integer value 30. Variable names start with lowercase letters and numbers are written without quotes.
Fill all three blanks to create a local variable named full_name and assign it the string "John Doe".
[1] = [2] + " " + [3]
The local variable full_name is assigned by joining two strings with a space. Variable names start lowercase, and strings are in quotes.