• | |

    Understanding JSON Syntax: The 7 Core Rules

    Understanding JSON Syntax: The 7 Core Rules When writing JSON (JavaScript Object Notation), following the correct syntax is crucial to ensuring your data is well-formatted and valid. Regardless of the data types you are working with, building a JSON file relies on seven fundamental rules. File Extension Basics Before diving into the syntax itself, always…

  • break and continue

    In Python, break and continue are loop control statements. They allow you to alter the standard flow of a loop (whether a for loop or a while loop) based on specific conditions. Here is a detailed breakdown of how each statement works, along with examples. The break Statement The break statement is used to completely…

  • For Loop in Python

    A for loop in Python is used to iterate over a sequence (such as a list, tuple, dictionary, set, or string) or any other iterable object. Unlike a while loop that runs as long as a condition is true, a for loop runs a specific number of times—once for each item in the sequence. The…

  • While loop

    A while loop in Python is used to repeatedly execute a block of code as long as a given condition remains True. It is particularly useful when you don’t know beforehand how many times the loop needs to run. Before every iteration, Python evaluates the condition. If it evaluates to True, the code inside the…

  • |

    What is JSON?

    What is JSON? JSON stands for JavaScript Object Notation. It is a lightweight, text-based data interchange format designed to be easy for humans to read and write, and simple for machines to parse and generate. Although derived from a subset of JavaScript’s object syntax, JSON is completely language-independent. Virtually every modern programming language (Python, Java,…

  • |

    what is rest

    Class Notes: Introduction to REST 1. Core Definition Key Takeaway: REST is a design pattern, not a strict protocol. 2. Protocol vs. Design Pattern To understand REST, it is crucial to understand the difference between a protocol and a design pattern: 3. The 6 Principles of REST Roy Fielding outlined six specific design patterns for…

  • The Magic 8-Ball!

    Let’s build The Magic 8-Ball! A Magic 8-Ball is a fun toy where you ask it a “yes or no” question, shake it, and it gives you a random answer about the future. We can build our own digital version using the if, elif, and else statements you just learned. To make the answer a…