0
0
Intro to Computingfundamentals~10 mins

Variables and data storage in Intro to Computing - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to store the number 10 in a variable named score.

Intro to Computing
score = [1]
Drag options to blanks, or click blank then click option'
A10
B"10"
Cscore
Dten
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the number 10 inside quotes, which makes it a string.
Using the variable name on the right side instead of a value.
2fill in blank
medium

Complete the code to store the text 'hello' in a variable named greeting.

Intro to Computing
greeting = [1]
Drag options to blanks, or click blank then click option'
Ahello
B'greeting'
C"hello"
Dgreeting
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the text.
Using the variable name instead of the text.
3fill in blank
hard

Fix the error in the code to correctly store the value 5 in variable count.

Intro to Computing
count = [1]
Drag options to blanks, or click blank then click option'
A5
Bfive
Ccount
D"5"
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the number.
Using a word instead of a number.
4fill in blank
hard

Fill both blanks to create a variable age and assign it the value 30.

Intro to Computing
[1] = [2]
Drag options to blanks, or click blank then click option'
Aage
B30
Cage
D"30"
Attempts:
3 left
💡 Hint
Common Mistakes
Adding spaces or quotes around the variable name.
Putting the number 30 in quotes, making it a string.
5fill in blank
hard

Fill all three blanks to create a variable name and assign it the text 'Alice'.

Intro to Computing
[1] = [2] + [3]
Drag options to blanks, or click blank then click option'
Aname
B"A"
C"lice"
DAlice
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around text parts.
Using the full name without quotes or concatenation.