Complete the code to identify the platform type.
platform = '[1]' # Choose the platform type
The code sets the platform variable to 'mobile' to indicate a mobile app environment.
Complete the code to check if the application is a desktop app.
if app_type == '[1]': print('Running on desktop')
The condition checks if the app_type is 'desktop' to confirm it's a desktop application.
Fix the error in the code that distinguishes app types.
def is_mobile(app): return app == '[1]'
The function returns True if the app is 'mobile', correctly identifying mobile apps.
Fill both blanks to create a dictionary mapping app types to their platforms.
app_platforms = {
'WhatsApp': '[1]',
'Photoshop': '[2]'
}WhatsApp is a mobile app, and Photoshop is a desktop application.
Fill all three blanks to filter mobile apps from a list.
apps = ['WhatsApp', 'Photoshop', 'Instagram', 'Excel'] mobile_apps = [app for app in apps if app [1] ['WhatsApp', [2], [3]]]
The list comprehension filters apps that are in the list of known mobile apps: WhatsApp, Instagram, and Snapchat.
