0
0
Intro to Computingfundamentals~10 mins

Privacy settings and data protection 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 set a privacy setting to 'private'.

Intro to Computing
user_profile['privacy'] = '[1]'
Drag options to blanks, or click blank then click option'
Aopen
Bpublic
Cprivate
Dshared
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'public' exposes data to everyone.
2fill in blank
medium

Complete the code to check if data encryption is enabled.

Intro to Computing
if settings['encryption'] == [1]:
    print('Data is secure')
Drag options to blanks, or click blank then click option'
A'disabled'
B'unknown'
C'pending'
D'enabled'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'disabled' will not secure the data.
3fill in blank
hard

Fix the error in the code to properly delete user data.

Intro to Computing
if user_consent == [1]:
    delete_data(user_id)
Drag options to blanks, or click blank then click option'
ATrue
BNone
CFalse
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'False' deletes data without consent.
4fill in blank
hard

Fill both blanks to filter data for users with consent and encrypt it.

Intro to Computing
filtered_data = {user: data for user, data in all_data.items() if data['consent'] == [1]
encrypted_data = encrypt([2])
Drag options to blanks, or click blank then click option'
ATrue
BFalse
Cfiltered_data
Dall_data
Attempts:
3 left
💡 Hint
Common Mistakes
Encrypting all data instead of filtered data.
5fill in blank
hard

Fill both blanks to create a dictionary of users with encrypted emails who consented.

Intro to Computing
secure_users = {user: [1] for user, info in users.items() if info['consent'] == [2] }
Drag options to blanks, or click blank then click option'
A{
Bencrypt(info['email'])
CTrue
D[
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets instead of braces for dictionary.