0
0
Intro to Computingfundamentals~10 mins

Ethics and bias in AI 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 message about AI fairness.

Intro to Computing
print("AI systems should be [1] to all users.")
Drag options to blanks, or click blank then click option'
Abiased
Bcomplex
Cfair
Dslow
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'biased' because it sounds technical.
Choosing 'complex' thinking AI should be complicated.
2fill in blank
medium

Complete the code to check if AI data is free from {{BLANK_1}}.

Intro to Computing
if data_contains_bias([1]):
    print("Warning: Data has bias!")
Drag options to blanks, or click blank then click option'
Adataset
Balgorithm
Cmodel
Duser
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'algorithm' which is the AI logic, not the data.
Using 'model' which is built from data.
3fill in blank
hard

Fix the error in the code to avoid bias in AI decisions.

Intro to Computing
def make_decision(input_data):
    if input_data['age'] [1] 18:
        return "Reject"
    else:
        return "Accept"
Drag options to blanks, or click blank then click option'
A!=
B>=
C==
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' which rejects 18 and older.
Using '==' which only checks exact age.
4fill in blank
hard

Fill both blanks to create a function that checks for bias and returns a fair result.

Intro to Computing
def check_fairness(data):
    bias_found = data.get('[1]', False)
    if bias_found [2] True:
        return "Bias detected"
    return "Fair"
Drag options to blanks, or click blank then click option'
Abias
B==
C!=
Derror
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' which checks for bias not being true.
Using 'error' which is not a valid operator.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters biased entries.

Intro to Computing
filtered_data = [1]: [2] for [1] in data if data[[1]] [3] False
Drag options to blanks, or click blank then click option'
Akey
Bdata[key]
C!=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' which would include biased entries.
Using different variable names causing errors.