0
0
Intro to Computingfundamentals~10 mins

Why software gives hardware purpose in Intro to Computing - Test Your Understanding

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

Complete the code to print a message using software instructions.

Intro to Computing
print([1])
Drag options to blanks, or click blank then click option'
Aprint
B"Hello, world!"
CHello, world!
Dmessage
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around the text.
Using a variable name without defining it.
2fill in blank
medium

Complete the code to assign a number to a variable.

Intro to Computing
speed = [1]
Drag options to blanks, or click blank then click option'
A100
B"fast"
Cspeed
Dprint
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers inside quotes, making them strings.
Using a function name instead of a value.
3fill in blank
hard

Fix the error in the code to make the computer add two numbers.

Intro to Computing
result = 5 [1] 3
Drag options to blanks, or click blank then click option'
A-
B*
C/
D+
Attempts:
3 left
💡 Hint
Common Mistakes
Using - instead of + causes subtraction.
Using * or / changes the operation.
4fill in blank
hard

Fill both blanks to create a loop that counts from 1 to 5.

Intro to Computing
for [1] in range([2]):
    print([1] + 1)
Drag options to blanks, or click blank then click option'
Ai
B5
Cx
Drange
Attempts:
3 left
💡 Hint
Common Mistakes
Using range instead of a variable name.
Using a variable name for range().
5fill in blank
hard

Fill all three blanks to create a dictionary of squares for numbers greater than 2.

Intro to Computing
squares = { [1]: [2]**2 for [3] in range(1, 6) if [3] > 2 }
Drag options to blanks, or click blank then click option'
Ax
Dy
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names causing errors.
Not using dictionary braces {}.