0
0
Intro to Computingfundamentals~10 mins

How programs are compiled or interpreted in Intro to Computing - Interactive Practice

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

Complete the code to show the first step in compiling a program.

Intro to Computing
source_code = read_file('program.c')
compiled_code = [1](source_code)
Drag options to blanks, or click blank then click option'
Acompile
Binterpret
Cexecute
Ddebug
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'interpret' instead of 'compile' because both relate to running code.
2fill in blank
medium

Complete the code to show how an interpreter runs a program.

Intro to Computing
source_code = read_file('script.py')
[1](source_code)
Drag options to blanks, or click blank then click option'
Ainterpret
Bexecute
Ccompile
Dtranslate
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'compile' because it sounds similar but it is a different process.
3fill in blank
hard

Fix the error in the code that tries to compile and then run a program.

Intro to Computing
compiled_code = compile(source_code)
[1](compiled_code)
Drag options to blanks, or click blank then click option'
Ainterpret
Bexecute
Ccompile
Ddebug
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'interpret' which is for running source code, not compiled code.
4fill in blank
hard

Fill both blanks to complete the process of compiling and running a program.

Intro to Computing
source_code = read_file('app.c')
[1]_code = [2](source_code)
run([1]_code)
Drag options to blanks, or click blank then click option'
Acompiled
Bcompile
Cinterpret
Dexecute
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping 'interpret' and 'compile' or using 'execute' as a function.
5fill in blank
hard

Fill all three blanks to create a dictionary showing the steps of interpreting a program.

Intro to Computing
steps = {
  [1]: 'Read source code',
  [2]: 'Translate and run line',
  [3]: 'Repeat until done'
}
Drag options to blanks, or click blank then click option'
A1
B2
C3
D'step1'
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings like 'step1' instead of numbers for keys.