0
0
Intro to Computingfundamentals~10 mins

File formats and extensions 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 assign the correct file extension for a text document.

Intro to Computing
file_name = "document" + [1]
Drag options to blanks, or click blank then click option'
A.mp3
B.exe
C.txt
D.jpg
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing an extension for audio or images instead of text.
2fill in blank
medium

Complete the code to assign the correct file extension for an image file.

Intro to Computing
image_file = "photo" + [1]
Drag options to blanks, or click blank then click option'
A.mp4
B.pdf
C.docx
D.jpg
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing image extensions with video or document extensions.
3fill in blank
hard

Fix the error in the code by choosing the correct file extension for an audio file.

Intro to Computing
audio_file = "song" + [1]
Drag options to blanks, or click blank then click option'
A.txt
B.mp3
C.png
D.exe
Attempts:
3 left
💡 Hint
Common Mistakes
Using image or executable file extensions for audio files.
4fill in blank
hard

Fill both blanks to create a dictionary mapping file types to their common extensions.

Intro to Computing
file_extensions = {"text": [1], "image": [2]
Drag options to blanks, or click blank then click option'
A".txt"
B".mp3"
C".jpg"
D".exe"
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing audio or executable extensions with text or image types.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping file types to their extensions, including audio files.

Intro to Computing
file_types = {"text": [1], "audio": [2], "image": [3]
Drag options to blanks, or click blank then click option'
A".exe"
B".mp3"
C".jpg"
D".txt"
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing executable extensions with file type extensions.