0
0
Intro to Computingfundamentals~10 mins

AI in daily life (recommendations, assistants) 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 print a simple greeting from a virtual assistant.

Intro to Computing
print("Hello, I am your [1] assistant!")
Drag options to blanks, or click blank then click option'
Amusic
Bvirtual
Cweather
Dshopping
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a specific type like 'music' or 'weather' instead of 'virtual'.
2fill in blank
medium

Complete the code to check if a recommendation system suggests a movie based on user preference.

Intro to Computing
if user_preference == [1]:
    print("We recommend this movie!")
Drag options to blanks, or click blank then click option'
A"comedy"
B"action"
C"drama"
D"horror"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the string value.
3fill in blank
hard

Fix the error in the code that simulates a voice assistant responding to a command.

Intro to Computing
command = "play music"
if command [1] "play music":
    print("Playing your favorite songs.")
Drag options to blanks, or click blank then click option'
A=>
B!=
C==
D=
Attempts:
3 left
💡 Hint
Common Mistakes
Using = instead of == causes syntax errors.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps app names to their AI feature status.

Intro to Computing
ai_features = {app[1]: status for app, status [2] apps.items() if status == True}
Drag options to blanks, or click blank then click option'
A.lower()
Bin
C==
D.upper()
Attempts:
3 left
💡 Hint
Common Mistakes
Using comparison operator == instead of in for iteration.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters AI assistants by language and converts names to uppercase.

Intro to Computing
filtered_assistants = [1]: assistant for assistant, language [2] assistants.items() if language [3] "English"}
Drag options to blanks, or click blank then click option'
Aassistant.upper()
Bin
C==
Dassistant.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up == and =, or using wrong string methods.