Bird
Raised Fist0
Intro to Computingfundamentals~10 mins

Next steps in your computing journey in Intro to Computing - Interactive Code Practice

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

Complete the code to print a friendly welcome message.

Intro to Computing
print([1])
Drag options to blanks, or click blank then click option'
A"Hello, friend!"
Bprint("Hello, friend!")
CHello, friend!
DHello friend
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around text
Trying to print without parentheses
2fill in blank
medium

Complete the code to create a list of numbers from 1 to 5.

Intro to Computing
numbers = list(range(1, [1]))
Drag options to blanks, or click blank then click option'
A1
B5
C6
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 5 which excludes 5 itself
Starting range at 1 without adjusting end
3fill in blank
hard

Fix the error in the code to check if a number is even.

Intro to Computing
if number [1] 2 == 0:
    print("Even")
Drag options to blanks, or click blank then click option'
A**
B%
C//
D+
Attempts:
3 left
💡 Hint
Common Mistakes
Using + or ** instead of %
Using // which is floor division
4fill in blank
hard

Fill both blanks to create a dictionary of word lengths for words longer than 3 letters.

Intro to Computing
{word: [1] for word in words if len(word) [2] 3}
Drag options to blanks, or click blank then click option'
Alen(word)
B>
C<
Dword
Attempts:
3 left
💡 Hint
Common Mistakes
Using word instead of len(word)
Using < instead of >
5fill in blank
hard

Fill all three blanks to create a dictionary with uppercase keys and values greater than 0.

Intro to Computing
result = {{ [1]: [2] for k, v in data.items() if v [3] 0 }}
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
C>
Dk
Attempts:
3 left
💡 Hint
Common Mistakes
Using k instead of k.upper()
Using < instead of >

Practice

(1/5)
1. What is the best first step when starting your computing journey?
easy
A. Only watch videos without practicing
B. Buy the most expensive computer
C. Skip learning and start coding complex programs
D. Learn the basics of how computers work

Solution

  1. Step 1: Understand the importance of basics

    Starting with basics helps build a strong foundation for future learning.
  2. Step 2: Evaluate options

    Options A, B, and C skip important foundational steps or are not effective for learning.
  3. Final Answer:

    Learn the basics of how computers work -> Option D
  4. Quick Check:

    Basics first = D [OK]
Hint: Start simple to build a strong foundation [OK]
Common Mistakes:
  • Trying to learn advanced topics too soon
  • Ignoring how computers work
  • Not practicing regularly
2. Which of the following is the correct way to write a simple print statement in Python?
easy
A. print('Hello, world!')
B. echo 'Hello, world!'
C. console.log('Hello, world!')
D. printf('Hello, world!')

Solution

  1. Step 1: Identify the language syntax

    Python uses the print() function to display output.
  2. Step 2: Match options to Python syntax

    Only print('Hello, world!') uses correct Python syntax; others belong to different languages.
  3. Final Answer:

    print('Hello, world!') -> Option A
  4. Quick Check:

    Python print = B [OK]
Hint: Remember Python uses print() for output [OK]
Common Mistakes:
  • Using syntax from other languages
  • Missing parentheses in print
  • Using quotes incorrectly
3. What will be the output of this Python code?
count = 0
for i in range(3):
    count += i
print(count)
medium
A. 6
B. 0
C. 3
D. Error

Solution

  1. Step 1: Trace the loop iterations

    range(3) gives i values 0, 1, 2. Adding these to count: 0+0=0, 0+1=1, 1+2=3.
  2. Step 2: Calculate final count value

    After loop, count is 3.
  3. Final Answer:

    3 -> Option C
  4. Quick Check:

    Sum 0+1+2 = 3 [OK]
Hint: Add loop values carefully to find sum [OK]
Common Mistakes:
  • Adding one extra number
  • Confusing range end value
  • Assuming count starts at 1
4. Identify the error in this Python code:
for i in range(5)
    print(i)
medium
A. Incorrect indentation of print statement
B. Missing colon ':' after range(5)
C. range() function is not defined
D. print() cannot be used in loops

Solution

  1. Step 1: Check syntax of for loop

    Python requires a colon ':' at the end of the for loop declaration line.
  2. Step 2: Verify indentation

    Indentation of print is correct; range() is built-in; print() works in loops.
  3. Final Answer:

    Missing colon ':' after range(5) -> Option B
  4. Quick Check:

    For loop needs ':' = A [OK]
Hint: Look for missing colons in loop statements [OK]
Common Mistakes:
  • Ignoring missing colon errors
  • Misunderstanding indentation rules
  • Thinking range() needs import
5. You want to practice programming regularly. Which plan will help you improve the most?
hard
A. Write small programs daily and review mistakes
B. Only read programming books without coding
C. Try to memorize code without understanding
D. Code only once a month for long hours

Solution

  1. Step 1: Understand effective learning habits

    Regular practice with small tasks helps build skills steadily.
  2. Step 2: Compare options

    Options B, C, and D lack practice, understanding, or consistency, which slows progress.
  3. Final Answer:

    Write small programs daily and review mistakes -> Option A
  4. Quick Check:

    Practice + review = A [OK]
Hint: Practice daily with small tasks for steady progress [OK]
Common Mistakes:
  • Ignoring regular practice
  • Focusing on memorization only
  • Coding infrequently with long breaks
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard