Intro to CS 1: Variables, Basic Computer Concepts & Terminology

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The terms ___ and ___ are often used to describe the roles of any two computers that are communicating with one-another on a network. A ___ computer requests data from a ___ computer. A ___ serves data to a ___.

"client" and "server"; A client computer requests data from a server computer; A server serves data to a client.

an image file named "monkey" may have an extension named ".jpg" to indicate the sub-variety of image data that is stored in the file. So the complete file name, as far as the operating system is concerned, would be ___

"monkey.jpg"

float variables

- #define a variable names x that refers to the floating point number 12.2 x = 12.2 - #define a variable names y that refers to the floating point number 3.14 y = 3.14

float literals

- #refer to the floating point number 12.2 directly by literally writing it 12.2 - #refere to the floating point number 3.14 by literally writing it 3.14

text editor

- (computer science) an application that can be used to create and view and edit text files - a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). - a program that deals exclusively with text files - ex. Visual Studio Code

operating system

- (computer science) software that controls the execution of computer programs and may provide various services - define the ways in which you, the human, access the resources available on a computer - they also make sure that the hardware resources of the computer are shared nicely among all the different programs that are running - Personal computers generally have one of three flavors of operating system: Mac OS X, Windows, or a variety of UNIX/Linux

file extension

- A dot followed by three or four characters at the end of a file name, used to indicate the file type - a suffix attached to the name of a file - indicates to the operating system what type of data is in the file

Underscore

- A naming convention where each word is separated by an _ - a common variabale naming convention

Lower camel case

- A naming convention where the first letter is lowercase, and each subsequent start of a word is upper case. - a common variable naming convention

Variable

- A symbol used to represent a quantity that can change - (computer science), a symbolic name associated with a value and whose associated value may be changed - a placeholder for, or a reference to, some data stores in memory - not all variables hold numbers in programming (some can hold text or more complicated types of data)

Boolean variable

- Can hold only one of two values—true or false - examples: #define a variable named x that refers to the boolean True value x = True #define a variable named y that refers to the boolean False value y = false

binary files

- Computer-readable files - a term for those files used to store other types of data besides just plain text - understand that binary files can contain more than just text - cannot be read in a text editor

you need to use image editing software like ___ in order to be able to read a binary file that was created in Photoshop in the .psd format; you will need to use a ___ to edit a video file; and so on

- Photoshop; video editing program - Binary format files are invariable specific to a particular type of application

File permissions

- The use of user and file attributes to control the actions a user can perform (read, write, delete, etc.) on each file. Also known as usage restrictions. - The file systems on all popular operating systems implement permissions that restrict who can read, write, and execute any given file or folder - permissions are granted to three different classes of potential users: user: the user who 'owns' the file or folder... every file or folder is owned by one user; group - a group of users who assigned to the file or folder; others - everyone else not including the user or the group

bytecode

- ___ is a form of code that is interpreted natively by the corresponding virtual machine. - ___ is called such because each instruction in these languages is one byte (8 bits) of data - can run on any computer that has a virtual machine installed (advantage bc typically machine code differs from processor to processor)

Lossless Compression

- a data compression algorithm that allows the original data to be perfectly reconstructed from the compressed data - data compression techniques in which no data is lost - A process for reducing the number of bits needed to represent something without losing any information. This process is reversible

Web Browser

- a software application for retrieving, presenting and traversing information resources on the World Wide Web. - a piece of software that runs on the client computer. It allows the user of the client machine (i.e. you) to browse files (i.e. web pages) that are stored on web servers (i.e. computers) connected to the Internet and made available to anyone to view.

integer variable

- a variable that stores an integer (number) value - variables are keywords that can refer to numbers examples: lucky_number = 4 ; x = 100 (lucky_number & x are the examples)

compression algorithms

- algorithms that are specialized for reducing the file size of specific kinds of files: images, videos, music, etc. - and there are other algorithms that offer general-purpose compression that is pretty good for all types of files. - Each of these algorithms takes the original file, compresses the data in it, and saves this new compressed data into a new file, usually adding a file extension that indicates which type of compression was used.

text files

- any file that exclusively stores binary data corresponding to ASCII or Unicode characters and nothing else. - a kind of computer file that is structured as a sequence of lines of electronic text. - a bunch of text; can be broken up onto several lines, or it can be all on one line - consists of "plain text" - text with no formatting (only text & line breaks & maybe some indents), no other embedded media, and no hidden content - one of the simplest kinds of file

file names

- as a general rule, do not use capital letters in your file names, except where absolutely necessary - do not use spaces at all in the name of any file you make - Besides alphabetic and numeric characters, do not use any special character except the underscore _ character and the period . character - should include the file extension, such as .html, jpg, .zip, .py, .java, etc.

an expression can...

- be as simple as a literal (5) - be as simple as a variable (x) - involve an operator performing an operation that results in one value (5 + x) - may involve a call to a function that returns a single value (do_something( ) ) - or any combination of the above: do_something ( ) + 5 /x

Lossy Compression

- data compression techniques in which some amount of data is lost. This technique attempts to eliminate redundant information. - A process for reducing the number of bits needed to represent something in which some information is lost or thrown away. This process is not reversible. - leads to a lower fidelity reproduction of the original data - In the process of reducing the amount of space the data takes, some compression algorithms will actually cut out and lose parts of the data. These are known as ___ formats.

statically typed

- each variable's type must be declared and cannot change while the program runs - variables ae stuck as the original data type they were initially defined as

compiling

- is translating an entire program from one programming languages into another - this term is most often used to refer to the process of translating code in a high-level programming language directly to machine code but also used to refer to the process of translating high-level programming code to an intermediate-level language, such as byte code.

Machine code

- language understood by the processor - each family of processors has its own variety of machine code - instructions in machine code can be directly executed by the processor it is designed for - lowest level of code that the processor knows how to execute (i.e. how to "run") - binary code: all 0's & 1's

mapping schemes

- map human-readable text characters to their corresponding computer-friendly binary numbers - a user sees a text character on the screen, while the computer sees the corresponding binary number in its memory (ex. ASCII & unicode)

Zip files

- one such type of general-purpose compressed type of file. - It is capable of compressing many files and even folders into a single, smaller, file. This file usually has the .zip file extension - Most operating systems come built in with software to create these files

Working Directory (Current Working Directory)

- only one directory on your file system is being actively looked at at any given time - refers to the current folder where the operating system is actively 'looking' at any given moment & can be easily changed by a user who knows how to browse files.

the cloud

- other competing paradigms and metaphors are currently gaining currency, such as '___', originally coined in the early 1990's

dynamically typed

- program figures out the type of all variables in the program - a variable's type may change while a program executes, usually based on what is assigned to the variable - you do not have to explicitly state what type of data the variable will hold when you define it (ex. a variable that previously held an integer can be later used to hold a string)

applications

- programs that depend upon on a particular operating system in order to be able to run. For example, Microsoft Word is an ___ that requires a specific operating system to run.

the paper paradigm

- refers to the paradigm used by most modern computers and operating systems - consists of, usually, black text on a white background, files within folders, and a "desktop" - created by many individuals and organisations, such as Douglas Engelbart, Xerox PARC, and Apple Computer, and was an attempt to make computers more user-friendly by making them resemble the common workplace of the time (with papers, folders, and a desktop)

Clockspeed

- speed of processor's electric pulses (oscillating at a certain frequency to keep time) - measured in Hertz (i.e. cycles per second) - the processor can only perform a fixed number of computations with each pulse - the pulses that the clock sends to the processor are typically 5 Volts or less

interpreting

- the code is being translated "on the fly" into machine code and immediately executed - contrast this with compiling, which involves bulk analysis and translation of an entire source code base to machine code, but does not execute the machine code - translates a single statement of source code at a time from one higher-level programming language into machine code and immediately executing that machine code on the processor

Processor/microprocessor/central processing unit (CPU)

- the core unit that does the actual computations - "the brains" of the computer - grouped in families that all share similar characteristics - usually each family has a specific variety of machine code that it understands - all instructions to the ___ as to what it should do must be specified as a sequence of these machine codes

source code

- the language written by the creator of the program (usually a human) - written as plain text - there are many popular source code programming languages, such as Java, Python, Javascript, C, C++, Objective C, C#, etc. - source code must usually be translated into some other type of code that the processor can natively understand, called machine code, before it can be executed

Upper Camel Case

- the naming convention where the first letter of each word is capitalized with no spaces between words - a common variable naming convention

string variables

- value goes inside quotes; the value is made up of text - variables involving words (i.e., letter strings) examples: #define a variable named x that refers to the string "money" x = "money" #define a variable named y that refers to the string 'a haircut' y = 'a haircut'

strings

- variables that hold text, as in a string of characters - a data type used to store text & built into most high-level programming languages, since storing & manipulating text is such a common need in programs

desktop metaphor

- visual display is organized into distinct regions, with a large empty workspace in the middle and a collection of tool icons around the perimeter - an interface metaphor which is a set of unifying concepts used by graphical user interfaces to help users interact more easily with the computer.[1] The desktop metaphor treats the computer monitor as if it is the top of the user's desk, upon which objects such as documents and folders of documents can be placed - The metaphor of representing a user's workspace on a computer as a virtual equivalent of an office desk is known as...

function

- whereas variables store a piece of data in memory, ___s store a series of commands in memory to be run at a later time - Think of a ___ as a block of code that performs a specific task - a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed.

literal

- write the values of the primitive data types directly - a raw value that refers to exactly what it looks like - a single value - a notation for representing a fixed value in source code. - when you literally write the value examples: lucky_number = 4 ; print(lucky_number + 666) (4 & 666 are the examples)

numbers written in code are always ___

literals

ZIP files use what type of compression?

lossless

In python literals that are numbers do ___ need quotes around them. But all literals that are strings ___ surrounded by quotes.

not; must be

All data, including text, is fundamentally stored as ___ in memory, storage, and in the computer's processor

numbers (binary data in particular)

internet

refers to the global network of interconnected computers. It is the infrastructure that allows computers around the globe to communicate with each other.

web

refers to the vast number of interlinking hypertext documents that exist on the internet. Thus the web generally refers to only those parts of the internet that are accessible via the HTTP or HTTPS protocol.

The ___ products you use to connect to servers are also sometimes referred to as clients. Thus the term client can either refer to the computer you use to request data from a server, or the particular ___ product you use to do so, depending on the context of the conversation.

software

Text files, including any source code you write in a high level programming language, are created and edited using a simple t___, a program that deals exclusively with text files.

text editor

assembling

the process of translating assembly language mnemonic codes into machine code for a specific processor family

Uploading

the transfer of data from a client to a server

Downloading

the transfer of data from a server to a client

concatenate

to link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)

Peer-to-peer file sharing

when any given computer simultaneously acts as both client and server. Even in such circumstances, we generally talk about each computer as working either as a client or a server, depending on the context of the discussion.

Documentation

Python docstring conventions All programs must be documented following these conventions

Binary file editors

The software used to create or edit binary files depends on the sub-type of binary file (ex. we typically use software such as Adobe Photoshop or Adobe Illustrator when dealing with image files and audio editing software such as Audacity when editing audio files)

Boolean Literal

The words true and false examples: - #refer to the boolean True value by literally writing it True -#refer to the boolean False value by literally writing it False

An example of a lossless compression format is the ___ format. ___ up files does not lose any of their data.

Zip, Zipping

text in quotes is always ___

a literal

y = x + 1 (1 is a/an ___)

an integer literal

expression

any code that evaluates to a single value

What is a computer?

any device, entity, or object that can perform computations

y = x + 1 (y & x are ___)

both variables

PNG and GIF are ___, and many others in the world of audio, video, and image compression exist as well.

examples of lossless raster image compression formats

MP3 and JPG and many other popular audio, video, and image compression formats.

examples of lossy compression algorithms

string literals

Character sequences enclosed in quotes, such as "Harry". - examples: #refer to the string "money" by literally writing it "money" #refer to the string 'a haircut' by literally writing it 'a haircut'


Ensembles d'études connexes

Kin 236 Exam #2 Learning Objectives and Study Guide

View Set

PNC 1- Exam 3: Collaboration, Leadership, and Health Promotion

View Set

Molecular Bio Test 2: Multiple Choice Questions:

View Set

LUOA World History II - Module 4: Absolutism, Reason, & Revolution

View Set

Completing the Application, Underwriting, and Delivery Policy

View Set

Porth Patho Chapter 35 Chapter 35: Somatosensory Function, Pain, and Headache

View Set