Bird
Raised Fist0
Intro to Computingfundamentals~10 mins

Mobile operating systems (iOS, Android) in Intro to Computing - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to print the name of a popular mobile operating system.

Intro to Computing
print("The most popular mobile OS is [1].")
Drag options to blanks, or click blank then click option'
ALinux
BWindows
CAndroid
DmacOS
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing desktop operating systems instead of mobile ones.
2fill in blank
medium

Complete the sentence to name the mobile OS exclusive to Apple devices.

Intro to Computing
The mobile operating system exclusive to iPhones is called [1].
Drag options to blanks, or click blank then click option'
AAndroid
BiOS
CWindows Phone
DBlackBerry OS
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Android with iOS.
3fill in blank
hard

Fix the error in the code that checks if a device runs Android.

Intro to Computing
device_os = "iOS"
if device_os == [1]:
    print("This device runs Android.")
Drag options to blanks, or click blank then click option'
A"Android"
Bdevice_os
C"iOS"
DAndroid
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around string literals.
Comparing to the wrong OS name.
4fill in blank
hard

Fill both blanks to create a list of mobile OS names and print the first one.

Intro to Computing
mobile_os = [[1], [2]]
print(mobile_os[0])
Drag options to blanks, or click blank then click option'
A"Android"
B"Windows"
C"iOS"
D"Linux"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes for strings.
Using desktop OS names instead.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping OS names to their developers and print the developer of iOS.

Intro to Computing
os_developers = {
    [1]: [2],
    [3]: "Google"
}
print(os_developers["iOS"])
Drag options to blanks, or click blank then click option'
A"iOS"
B"Apple"
C"Android"
D"Microsoft"
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up keys and values.
Forgetting quotes around strings.

Practice

(1/5)
1. Which of the following is a mobile operating system used in smartphones?
easy
A. Android
B. Windows 10
C. macOS
D. Linux Ubuntu

Solution

  1. Step 1: Understand what a mobile operating system is

    A mobile operating system controls a smartphone's apps and hardware.
  2. Step 2: Identify common mobile operating systems

    Android and iOS are the main mobile operating systems; Windows 10, macOS, and Linux Ubuntu are for computers.
  3. Final Answer:

    Android -> Option A
  4. Quick Check:

    Mobile OS = Android [OK]
Hint: Mobile OS = Android or iOS, not desktop OS [OK]
Common Mistakes:
  • Confusing desktop OS with mobile OS
  • Thinking macOS or Linux Ubuntu run on phones
  • Assuming Windows 10 is for smartphones
2. Which of these is the correct way to describe iOS?
easy
A. A mobile operating system developed by Google
B. A mobile operating system developed by Apple
C. A hardware component in smartphones
D. A type of smartphone app

Solution

  1. Step 1: Identify the developer of iOS

    iOS is created and maintained by Apple for their devices.
  2. Step 2: Differentiate iOS from hardware and apps

    iOS is software (an operating system), not hardware or an app.
  3. Final Answer:

    A mobile operating system developed by Apple -> Option B
  4. Quick Check:

    iOS = Apple OS [OK]
Hint: iOS = Apple mobile OS, not Google or hardware [OK]
Common Mistakes:
  • Confusing iOS as Google's product
  • Thinking iOS is hardware or an app
  • Mixing iOS with Android
3. Consider this flowchart describing how Android manages app permissions:

What happens if the user denies permission when an app requests access to the camera?
medium
A. The app can still use the camera without restrictions
B. The app is deleted automatically
C. The phone restarts automatically
D. The app cannot access the camera and must handle denial

Solution

  1. Step 1: Understand permission request flow

    Android asks users to allow or deny app permissions like camera access.
  2. Step 2: Analyze user denial effect

    If permission is denied, the app cannot use that feature and must handle this case gracefully.
  3. Final Answer:

    The app cannot access the camera and must handle denial -> Option D
  4. Quick Check:

    Denied permission = no access [OK]
Hint: Denied permission means no access for app [OK]
Common Mistakes:
  • Assuming app still gets access after denial
  • Thinking phone restarts or deletes app automatically
  • Ignoring permission handling by apps
4. A developer wrote this code snippet for Android app permissions:
if (permission == "granted") {
  accessCamera();
} else {
  accessCamera();
}

What is the problem with this code?
medium
A. It calls accessCamera() even if permission is denied
B. It never calls accessCamera()
C. It causes the app to crash immediately
D. It requests permission twice

Solution

  1. Step 1: Read the conditional code carefully

    Both the if and else blocks call accessCamera(), ignoring permission status.
  2. Step 2: Understand permission handling best practice

    Access should only be granted if permission is "granted"; else, accessCamera() should not be called.
  3. Final Answer:

    It calls accessCamera() even if permission is denied -> Option A
  4. Quick Check:

    Permission check fails, access always called [OK]
Hint: Check if else block wrongly calls restricted functions [OK]
Common Mistakes:
  • Ignoring else block calls
  • Assuming code requests permission automatically
  • Thinking app crashes without permission
5. You want to develop an app that works on both iOS and Android. Which approach best handles differences in their operating systems?
hard
A. Write separate codebases for iOS and Android using their native languages
B. Write code only for Android and hope it runs on iOS
C. Use a cross-platform framework that adapts to both OS features
D. Develop only for iOS because it has more users

Solution

  1. Step 1: Understand platform differences

    iOS and Android have different languages and system rules, so code must adapt.
  2. Step 2: Evaluate development approaches

    Separate codebases require more work; cross-platform frameworks allow one codebase to work on both.
  3. Step 3: Choose the best practical solution

    Using a cross-platform framework balances effort and compatibility.
  4. Final Answer:

    Use a cross-platform framework that adapts to both OS features -> Option C
  5. Quick Check:

    Cross-platform = one code, both OS [OK]
Hint: Cross-platform frameworks simplify multi-OS apps [OK]
Common Mistakes:
  • Ignoring platform differences
  • Assuming Android code runs on iOS
  • Choosing only one OS limits users
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard