Ruby - Variables and Data TypesWhy does Ruby require local variable names to start with a lowercase letter or underscore?ATo allow spaces in variable namesBTo distinguish local variables from constants and global variablesCTo make variable names case-insensitiveDTo prevent variables from being reassignedCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand Ruby naming conventions purposeRuby uses naming rules to differentiate variable types: local variables, constants, globals.Step 2: Explain why lowercase or underscore start is requiredStarting with lowercase or underscore marks local variables, uppercase marks constants, $ marks globals.Final Answer:To distinguish local variables from constants and global variables -> Option BQuick Check:Naming rules separate variable types = true [OK]Quick Trick: Naming rules help Ruby know variable types [OK]Common Mistakes:Thinking naming affects case sensitivityBelieving naming prevents reassignment
Master "Variables and Data Types" in Ruby9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Ruby Quizzes Arrays - Array comparison and set operations - Quiz 7medium Hashes - Dig method for nested access - Quiz 9hard Methods - Implicit return (last expression) - Quiz 15hard Methods - Predicate methods (ending with ?) - Quiz 6medium Methods - Predicate methods (ending with ?) - Quiz 3easy Methods - Implicit return (last expression) - Quiz 12easy Operators and Expressions - Logical operators (&&, ||, !) - Quiz 4medium Operators and Expressions - Range operators (.. and ...) - Quiz 8hard Variables and Data Types - Integer and Float number types - Quiz 8hard Variables and Data Types - Symbol type and immutability - Quiz 1easy