Curriculum
Which of the following are valid variable names?
user_name1usertotal-cost_tempclassCorrect the following invalid variable names:
1name = "Alice"
user-name = "Bob"
class = "VIP"
Rewrite the following code with descriptive variable names:
x = "Alice"
y = 25
z = "Blue"
Correct Answer: 1, 4
name1 = "Alice"
user_name = "Bob"
user_class = "VIP"user_name = "Alice"
user_age = 25
favorite_color = "Blue"We noticed you're visiting from United Kingdom (UK). We've updated our prices to Pound sterling for your shopping convenience. Use United States (US) dollar instead. Dismiss
Not a member yet? Register now
Are you a member? Login now