Notes, summaries, assignments, exams, and exercises for Computer science for Secondary education

Understanding Merkle Trees, Blockchain, and Digital Signatures

Computer science2.43 KB

Merkle Trees and Data Verification

A Merkle Tree is a method of structuring data that allows a large body of information to be verified for accuracy extremely quickly and efficiently. Every Merkle tree results in a single string of data, known as the Merkle root. With the Merkle root, plus a few other pieces of data, any computer can efficiently validate all of the other entries in the Merkle tree. Merkle trees are used in distributed systems for efficient data verification. They are efficient because they use hashes instead of full files. Hashes are ways of encoding files that are much smaller than the actual file itself.

Key Blockchain Components

  • Block: A block, sometimes called a physical record, is a sequence of bytes or bits, usually containing
...
Continue reading "Understanding Merkle Trees, Blockchain, and Digital Signatures" »

Web Design & Development Glossary: Terms and Definitions

Computer science3 KB

Web Design & Development

Common Terms

Web Design

Is the act or practice of determining how a website looks.

Web Development

Is the act or practice of determining how a website works.

Navigation

Is the act of using and finding things on a website.

CSS

(Cascading Style Sheets) is a simple language that decides how a web page looks.

Coding

Is the programming language that makes up a website.

Visibility

Is how easily people find a website using search engines, based on how many other websites link to it.

Usability

Is how easy it is for a person to use a website.

Content

Is the material on a web page, including text and graphics.

Appearance

Is how a web page looks.

Functionality

Is the ability of different elements of a website to work together.

Programming Languages

C

Is...

Continue reading "Web Design & Development Glossary: Terms and Definitions" »

Essential IT English: Vocabulary, Grammar, and Computer Concepts

Computer science3.87 KB

Topic 2: Information Technology Fundamentals

IT Vocabulary Exercises

Word Matching: Find the Synonyms/Related Terms

  • Click
  • Sharp
  • Back up
  • Range
  • Displays

Software Terminology Matching

  • 1. C
  • 2. F
  • 3. G
  • 4. H
  • 5. B
  • 6. D
  • 7. I
  • 8. E
  • 9. A

Listening Comprehension: True or False

  • (1, 4, 5, 8) = False
  • (2, 3, 6, 7) = True

Classifying Phrases for IT Descriptions

  • Consist of
  • Can be divided into
  • Includes
  • Is a type of
  • There are two classes

Workbook Activities: Computer Components

1. Hardware Parts Identification

  • Flat LCD monitor
  • Mouse
  • DVD Drive
  • Printer
  • Webcam

2. IT Crossword Puzzle Answers

  • 1. Input
  • 2. Port
  • 3. Keyboard
  • 4. CPU
  • 5. Peripherals
  • 6. Software
  • 7. Output
  • 8. Drive
  • 9. Hardware

3. Computer Device Types (Email Context)

  • Laptop
  • PDA
  • Mainframe
  • Tablet PC
  • Desktop PC

4. Prepositions for Classification

  • Classify into
  • Divide
...
Continue reading "Essential IT English: Vocabulary, Grammar, and Computer Concepts" »

Essential Programming Concepts: Variables, Data Types, and Algorithms

Computer science1.89 KB

Variables and Constants

Variable

A named data location in a program for a value that can be changed throughout the execution of the program.

  • Definition: A storage location containing data that can be modified.
  • Usage: Once created and assigned, a variable can be used repeatedly and reassigned new values.
  • Naming: Use descriptive names related to the stored data. Avoid spaces to prevent syntax errors.

Constant

A named data location in a program for a value that remains the same throughout the program's execution.

  • Definition: A storage location for values that should not change.
  • Benefit: Updating the value at the definition point automatically updates it everywhere the constant is used.

Data Types

  • String: A sequence of characters or symbols.
  • Numbers:
    • Integer:
...
Continue reading "Essential Programming Concepts: Variables, Data Types, and Algorithms" »

Creating BIM'S: A Collaborative Game Development Story

Computer science3.63 KB

Scene 1:

  • Everyone shows up in a round table with computers thinking on what is the new game they will create.

  • Poster: Brainstorm of ideas

  • Carla: What game should we create now?

  • Andrea: We can create a city!

  • Bernardo: Yes! Let’s create a game that allows creating and simulating the life of your own avatar.

  • Ines: That will be perfect! We can design clothes and accessories for the avatars

  • Cuesta: That is a great idea, and it will not take too much time to code.

  • Carla: We can also adapt the game so people can play using their smartphones.

  • Everyone: Great let's call it... BIM’S!

Scene 2:

  • Cuesta: You sit down in front of a computer and start typing codes. Let’s start with the coding

    • Question to Bernardo: Bernardo, do you remember the coding of how to make

...

Continue reading "Creating BIM'S: A Collaborative Game Development Story" »

Software Development and Ethics: A Comprehensive Overview

Computer science5.33 KB

What is a software and what is a good software?

A software is a program on a computer which contains information and data. A good software is the one that fulfills the needs and hasn’t got bugs.

Software vs Hardware

Software: not touchable, variable and implemented in order to achieve goals. Hardware: invariable

SOFTWARE ETHICS:

  • Confidentiality - Not telling the others because they can copy.
  • Competence - To know what you’re doing.
  • Intellectual property rights - not steal others ideas because it’s not moral.
  • Computer misuse - don’t do things that you are not allowed to.
  • Stuxnet: virus that will destroy softwares and hardwares.

SOFTWARE EVALUATION PROCESS:

  • Specification: What do I need?
  • Development: The programmer does it.
  • Validation: Does it work?
...
Continue reading "Software Development and Ethics: A Comprehensive Overview" »

Characteristics and Requirements of Programming Languages

Computer science2.75 KB

A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely. Thousands of different programming languages have been created, mainly in the computer field, with many more being created every year. Most programming languages describe computation in an imperative style, i.e., as a sequence of commands.

Requirements and Objectives

A computer programming language is a language used to write computer programs, which involve a computer performing some kind of computation or algorithm and possibly control external devices such as printers, disk drives,...

Continue reading "Characteristics and Requirements of Programming Languages" »

Defining Computer Programming Languages and Their Structure

Computer science2.99 KB

Programming Language Fundamentals

A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely. Thousands of different programming languages have been created, mainly in the computer field, with many more being created every year. Most programming languages describe computation in an imperative style, i.e., as a sequence of commands.

Requirements and Objectives of a Programming Language

1. Function and Target

A computer programming language is a language used to write computer programs, which involve a computer performing some kind of computation...

Continue reading "Defining Computer Programming Languages and Their Structure" »

Web Requests, Concurrency Control & Distributed Systems

Computer science2.53 KB

Web Requests: GET vs. POST

GET: The request displays the password in the browser URL.

POST: Does not remain in history and does not display the password or on the web server log, not displayed in URL.

Controlling Access to Resources

Lock: Use the database.

  • Implement file lock.

Optimistic Concurrency Control

When using locks, there is a possibility of deadlocks.

Solution:

Use timeout: When starting the processing of a request, set a maximum execution timeout. When the timeout expires, the system suspects that a possible problem (such as a deadlock) has occurred.

When the timeout expires, which request should be aborted?

We may end up canceling a request that is almost complete.

Deadlock Prevention

To prevent deadlock, the system can set all the locks the...

Continue reading "Web Requests, Concurrency Control & Distributed Systems" »

Essential C++ Programming Exercises and Solutions

Computer science3.54 KB

C++ Programming Exercises

This collection contains various C++ algorithms and solutions for common programming tasks.

1. Countdown Sequence

#include <iostream>
using namespace std;
int main() {
    int x, y = 0;
    cin >> x;
    while (x >= 0) {
        cout << y << endl;
        y = y + 1;
        x = x - 1;
    }
}

2. Harmonic Numbers

#include <iostream>
using namespace std;
int main() {
    cout.setf(ios::fixed);
    cout.precision(4);
    double h = 0;
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        h = h + 1.0 / i;
    }
    cout << h << endl;
}

3. Descending Interval

#include <iostream>
using namespace std;
int main() {
    int x, y;
    cin >> x >>
...
Continue reading "Essential C++ Programming Exercises and Solutions" »