PowerShell - Variables and Data TypesWhich of the following is the correct syntax to store the number 10 in a variable named $score in PowerShell?A$score := 10Bscore == 10C$score = 10Dset $score 10Check Answer
Step-by-Step SolutionSolution:Step 1: Recall PowerShell variable assignment syntaxPowerShell uses $variable = value to assign data.Step 2: Check each optionOnly "$score = 10" uses correct syntax with $ and single equals sign.Final Answer:$score = 10 -> Option CQuick Check:Correct variable assignment syntax = $score = 10 [OK]Quick Trick: Use $name = value to store data in PowerShell [OK]Common Mistakes:Using double equals for assignmentUsing := which is not PowerShell syntaxTrying to use 'set' command
Master "Variables and Data Types" in PowerShell9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PowerShell Quizzes Cmdlets and Pipeline - Where-Object for filtering - Quiz 1easy Control Flow - If-elseif-else statements - Quiz 12easy Control Flow - For loop - Quiz 2easy Control Flow - Why control flow directs execution - Quiz 4medium PowerShell Basics and Environment - First PowerShell command - Quiz 9hard String Operations - Regular expressions with -match - Quiz 15hard String Operations - Formatting with -f operator - Quiz 8hard String Operations - Here-strings for multiline - Quiz 8hard Variables and Data Types - String type and interpolation - Quiz 14medium Variables and Data Types - Type casting - Quiz 13medium