Migrate to Gitea

This commit is contained in:
2025-04-17 15:53:45 -06:00
parent da86957915
commit 7a0b0cd465
46 changed files with 6083 additions and 0 deletions

View File

@@ -0,0 +1,160 @@
{
"unit": {
"Logic": "BooleanAlgebra"
},
"title": "Mastering Boolean Algebra",
"screens": [
{
"screen_type": "Text",
"text": "Welcome, Cadet! You've been selected to join the Galactic Programming Fleet's advanced training program. Your mission: master the principles of Boolean algebra to solve complex logical problems and optimize your code. Ready to elevate your skills? Let's begin!",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "Boolean algebra is a branch of algebra that deals with true and false values. It provides a framework for simplifying logical expressions and is widely used in programming, circuit design, and more.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "In Boolean algebra, we use operations like AND, OR, and NOT, but we also work with laws and properties such as the commutative, associative, distributive, identity, and complement laws. These help us simplify and analyze logical expressions.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "For example, the commutative law states that the order of operands does not matter for AND and OR operations. A AND B is the same as B AND A, and A OR B is the same as B OR A.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Mcq",
"text": "",
"question": "Which of the following is true according to the commutative law?",
"options": [
"A AND B is the same as B AND A.",
"A OR B is the same as B OR A.",
"Both of the above."
],
"correct_indices": [2],
"correct_text": null,
"hints": [
"The commutative law applies to both AND and OR operations."
]
},
{
"screen_type": "Text",
"text": "The associative law states that the grouping of operands does not affect the result for AND and OR operations. For example, (A AND B) AND C is the same as A AND (B AND C).",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Mcq",
"text": "",
"question": "Which of the following expressions is equivalent to (A OR B) OR C according to the associative law?",
"options": [
"A OR (B OR C)",
"(A AND B) OR C",
"A AND (B AND C)"
],
"correct_indices": [0],
"correct_text": null,
"hints": [
"The associative law applies to OR operations."
]
},
{
"screen_type": "Text",
"text": "The distributive law allows us to distribute AND over OR and vice versa. For example, A AND (B OR C) is equivalent to (A AND B) OR (A AND C).",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Checkboxes",
"text": "",
"question": "Which of the following are valid applications of the distributive law? Select all that apply.",
"options": [
"A AND (B OR C) = (A AND B) OR (A AND C)",
"A OR (B AND C) = (A OR B) AND (A OR C)",
"A AND (B AND C) = (A AND B) AND C"
],
"correct_indices": [0, 1],
"correct_text": null,
"hints": [
"The distributive law applies to both AND over OR and OR over AND."
]
},
{
"screen_type": "Text",
"text": "The identity law states that A AND true is A, and A OR false is A. These identities help simplify expressions by removing redundant terms.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "FreeResponse",
"text": "",
"question": "What does A OR false simplify to according to the identity law?",
"options": null,
"correct_indices": null,
"correct_text": ["A", "a"],
"hints": [
"The identity law states that A OR false is A."
]
},
{
"screen_type": "Text",
"text": "The complement law states that A AND NOT A is false, and A OR NOT A is true. These laws are fundamental in Boolean algebra.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Mcq",
"text": "",
"question": "What does A AND NOT A evaluate to according to the complement law?",
"options": [
"True",
"False",
"A"
],
"correct_indices": [1],
"correct_text": null,
"hints": [
"The complement law states that A AND NOT A is always false."
]
},
{
"screen_type": "Text",
"text": "Congratulations, Cadet! You've completed the course on Boolean algebra. Remember, mastering these principles will help you simplify logical expressions and write efficient code. Keep practicing and applying these concepts in your projects!",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
}
]
}

View File

@@ -0,0 +1,205 @@
{
"unit": {
"Logic": "LogicalOperations"
},
"title": "Mastering Logical Operations",
"screens": [
{
"screen_type": "Text",
"text": "Welcome, Cadet! You've just been recruited to the Galactic Programming Fleet. Your mission: master the art of logical operations to navigate through complex coding challenges and save the galaxy from bad logic. Ready to embark on this adventure? Let's dive in!",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "Logical operations are used to make logical decisions. They allow us to compare values and decide what action to take next. In this course, you'll learn about AND, OR, and NOT operations.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "The president of Planet Zog has to keep her population safe and happy. She has a lot of decisions to make, and she needs to use logical operations to help her. For example, if the weather is nice AND the streets are clean, people can go to work. If the weather is NOT nice OR the streets are covered in slime, everyone should stay home.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "There are two logical operators in this rule. The first is AND, which means both conditions must be true for the result to be true. The second is OR, which means at least one condition must be true for the result to be true.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "The AND operation evaluates to `true` if both conditions are true. For example, if condition A and condition B are both true, the result is true. Otherwise, it's false.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "The OR operation evaluates to `true` if at least one condition is true. For example, if condition A or condition B is true, the result is true. If both are false, the result is false.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Text",
"text": "The NOT operation inverts a condition. If a condition is true, NOT makes it false, and vice versa. It's a simple but powerful tool in logical reasoning.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Mcq",
"text": "",
"question": "Which of the following is true for the AND operation?",
"options": [
"It evaluates to true if both conditions are true.",
"It evaluates to true if at least one condition is true.",
"It inverts the condition."
],
"correct_indices": [0],
"correct_text": null,
"hints": [
"Both conditions must be true for the result to be true."
]
},
{
"screen_type": "Text",
"text": "Now let's test your understanding of the OR operation. Remember, it evaluates to true if at least one condition is true.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Checkboxes",
"text": "",
"question": "Which of the following are true for the OR operation? Select all that apply.",
"options": [
"It evaluates to true only if both conditions are true.",
"It evaluates to true if at least one condition is true.",
"It evaluates to false only if both conditions are false."
],
"correct_indices": [1, 2],
"correct_text": null,
"hints": [
"OR is inclusive, meaning it evaluates to true if either or both conditions are true.",
"It only evaluates to false when both conditions are false."
]
},
{
"screen_type": "Text",
"text": "You're doing great! Now let's move on to the NOT operation. Remember, it inverts the condition.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "FreeResponse",
"text": "",
"question": "If a condition is true, what does the NOT operation evaluate to?",
"options": null,
"correct_indices": null,
"correct_text": ["false", "f"],
"hints": [
"NOT inverts the condition. If it's true, it becomes false."
]
},
{
"screen_type": "Text",
"text": "Let's try some more realistic examples. A programmer on Planet Zog needs to write a program that checks if the weather is nice and the streets are clean. If both conditions are true, the program should allow people to go to work.",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
},
{
"screen_type": "Mcq",
"text": "",
"question": "If the streets are clean AND the weather is NOT nice, what should the program do?",
"options": [
"Allow people to go to work.",
"Keep people at home."
],
"correct_indices": [1],
"correct_text": null,
"hints": [
"Both conditions must be true for the result to be true."
]
},
{
"screen_type": "Mcq",
"text": "",
"question": "If the streets are covered in slime AND the weather is NOT nice, what should the program do?",
"options": [
"Allow people to go to work.",
"Keep people at home."
],
"correct_indices": [1],
"correct_text": null,
"hints": [
"Both conditions must be true for the result to be true."
]
},
{
"screen_type": "Mcq",
"text": "",
"question": "If the streets are covered in slime OR the weather is NOT nice, what should the program do?",
"options": [
"Allow people to go to work.",
"Keep people at home."
],
"correct_indices": [1],
"correct_text": null,
"hints": [
"Both conditions must be true for the result to be true."
]
},
{
"screen_type": "Mcq",
"text": "",
"question": "If the streets are clean AND the weather is nice, what should the program do?",
"options": [
"Allow people to go to work.",
"Keep people at home."
],
"correct_indices": [0],
"correct_text": null,
"hints": [
"Both conditions must be true for the result to be true."
]
},
{
"screen_type": "Text",
"text": "Congratulations, Cadet! You've completed the course on logical operations. Remember, mastering these concepts is key to becoming a great programmer. Keep practicing and applying these skills in your projects!",
"question": null,
"options": null,
"correct_indices": null,
"correct_text": null,
"hints": null
}
]
}