Bird
Raised Fist0
Intro to Computingfundamentals~10 mins

Software licensing basics in Intro to Computing - Interactive Code Practice

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to print the type of software license.

Intro to Computing
license_type = "GPL"
print("The license is [1]")
Drag options to blanks, or click blank then click option'
AGPL
B"license_type"
Clicense
Dlicense_type
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the variable name, which prints the name instead of its value.
2fill in blank
medium

Complete the code to check if the license is 'MIT'.

Intro to Computing
if license == [1]:
    print("License is MIT")
Drag options to blanks, or click blank then click option'
A"MIT"
BMIT
C'GPL'
Dlicense
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around string literals causing errors or wrong comparisons.
3fill in blank
hard

Fix the error in the code to print 'Free software' if license is 'GPL'.

Intro to Computing
if license == [1]:
    print("Free software")
Drag options to blanks, or click blank then click option'
A'MIT'
BGPL
C"GPL"
Dlicense
Attempts:
3 left
💡 Hint
Common Mistakes
Using the variable name without quotes causing a NameError.
4fill in blank
hard

Fill the blank to create a dictionary of licenses and their types.

Intro to Computing
licenses = [1]
Drag options to blanks, or click blank then click option'
A"MIT"
B{"GPL": "Open Source", "Windows": "Proprietary"}
C"Proprietary"
D"Open Source"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using curly braces or missing quotes around strings.
5fill in blank
hard

Fill all three blanks to filter licenses that are Open Source.

Intro to Computing
open_source = {k: v for k, v in licenses.items() if v [1] [2]
print(open_source.get([3], "Not found"))
Drag options to blanks, or click blank then click option'
A==
B"Open Source"
C"MIT"
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison operators or wrong keys in get().

Practice

(1/5)
1. What is the main purpose of a software license?
easy
A. To explain how you can legally use the software
B. To increase the software's speed
C. To make the software free for everyone
D. To change the software's color scheme

Solution

  1. Step 1: Understand what a software license is

    A software license is a legal document that tells users what they can and cannot do with the software.
  2. Step 2: Identify the main purpose

    The main purpose is to explain the legal use of the software, protecting both the creator and the user.
  3. Final Answer:

    To explain how you can legally use the software -> Option A
  4. Quick Check:

    Software license = legal usage rules [OK]
Hint: Licenses tell you what is allowed with software [OK]
Common Mistakes:
  • Thinking licenses improve software performance
  • Assuming all software is free
  • Confusing license with software features
2. Which of the following is a correct statement about open source software licenses?
easy
A. They always require payment before use
B. They allow users to view and modify the source code
C. They forbid sharing the software with others
D. They prevent any changes to the software

Solution

  1. Step 1: Recall what open source means

    Open source software licenses allow users to see and change the software's source code.
  2. Step 2: Check each option

    They allow users to view and modify the source code correctly states that users can view and modify the source code, which is the key feature of open source licenses.
  3. Final Answer:

    They allow users to view and modify the source code -> Option B
  4. Quick Check:

    Open source = view and modify code [OK]
Hint: Open source means code is open to change [OK]
Common Mistakes:
  • Thinking open source always costs money
  • Believing open source forbids sharing
  • Confusing open source with closed source
3. Consider this scenario: A software is licensed under a commercial license. Which of the following is most likely true?
medium
A. You can freely modify and redistribute the software
B. The software is always open source
C. You must pay to use the software legally
D. You can use the software without any restrictions

Solution

  1. Step 1: Understand commercial license meaning

    Commercial licenses usually require payment to legally use the software.
  2. Step 2: Evaluate options based on commercial license

    You must pay to use the software legally states payment is required, which matches commercial license rules. Other options describe open source or free use, which are incorrect here.
  3. Final Answer:

    You must pay to use the software legally -> Option C
  4. Quick Check:

    Commercial license = pay to use [OK]
Hint: Commercial means you usually pay for use [OK]
Common Mistakes:
  • Assuming commercial means free to modify
  • Confusing commercial with open source
  • Ignoring payment requirements
4. A developer wants to share their software but keep control over modifications. Which license type should they choose?
medium
A. Public domain license
B. Permissive open source license
C. Proprietary (commercial) license
D. Copyleft open source license

Solution

  1. Step 1: Understand license types and control over modifications

    Copyleft licenses allow sharing but require that modifications remain under the same license, keeping control.
  2. Step 2: Compare options

    Public domain gives no control, permissive licenses allow modifications without restrictions, proprietary restricts sharing. Copyleft fits the requirement best.
  3. Final Answer:

    Copyleft open source license -> Option D
  4. Quick Check:

    Copyleft = share with control over changes [OK]
Hint: Copyleft keeps control while sharing [OK]
Common Mistakes:
  • Confusing permissive with copyleft
  • Thinking public domain restricts modifications
  • Assuming proprietary allows free sharing
5. A company wants to use open source software but avoid legal risks from modifying and redistributing it. What should they do?
hard
A. Use software with a permissive license and keep track of changes
B. Use any open source software without restrictions
C. Only use commercial software to avoid risks
D. Modify software without checking the license

Solution

  1. Step 1: Identify risk factors in open source use

    Modifying and redistributing open source software can have legal risks if license terms are not followed.
  2. Step 2: Choose best practice to reduce risks

    Using permissive licenses (like MIT or Apache) allows modification with fewer restrictions, and tracking changes helps compliance.
  3. Final Answer:

    Use software with a permissive license and keep track of changes -> Option A
  4. Quick Check:

    Permissive license + tracking = lower legal risk [OK]
Hint: Pick permissive licenses and document changes [OK]
Common Mistakes:
  • Assuming all open source licenses are the same
  • Ignoring license terms when modifying software
  • Believing commercial software is always safer