Thursday, January 14, 2016

Difference between For Loop and While Loop

For Loop:
- fixed repetition loop

- run given number of times regardless of how the loop changes the values of the variables

- counter value increases/decreases depending on loop min, max, other requirements; no separate statement in loop body

- use separate variable to run loop, can also start decreasing


While Loop:
- can have various conditions joined with AND/OR

- enters loop body only when condition is met

       - if condition not met, moves on to statement after the end of the loop

- statements within while loop change criteria

Thursday, October 29, 2015

input and output devices

I/P Devices

  • graphic tablets
  • cameras
  • video capture hardware
  • trackballs
  • barcode reader
  • digital camera
  • gamepad
  • joystick
  • keyboard
  • microphone
  • MIDI keyboard
  • mouse (pointing device)
  • scanner
  • webcam
  • touchpads
  • pen input
  • electronic whiteboard
  • magnetic key cards
O/P Devices
  • monitor
  • printers
  • plotters
  • projectors
  • LCD projection panels
  • computer output microfilm (COM)
  • speakers
  • radio
Both
  • modems
  • network cards
  • touch screen
  • headsets (speakers <-- output and microphone <-- input)
  • fax
  • audio cards/sound card
  • USB

bit/byte/compiler/interpreter/source byte code

Computers start working when you click the power button
  • computers consist of 0 and 1 {binary code} -- off and on
  • one unit (0 or 1) is called a bit
  • 8 bits equal one byte - a unit of memory
    • each character is assigned a byte -- a series of 8 bits -- that represents it
    • tells what is off and on
  • computers understand what we tell it to do by their compilers/interpreters
    • a compiler translates the whole program
    • an interpreter translates the program line by line
      • compiler/interpreter will alert you if part of the program doesn't compile
  • some types of source code are
    • c++, python, java
    • there is a set of grammatical rules/compilers in each of these

my perspective on computer architecture

Computer Science is an integral part of our modern society right now, and many people hold jobs in the industry. Because technology is a huge factor in everyone's daily lives, it is important for companies to create new innovative ideas. Computer Science consists of many branches - programming, making chips, developing software, and many others. Some programming languages include python, java, and c++.

How do computers understand what we type?
Computers have a compiler inside that reads in what we type and then does what we want it to do. There are also computer chips inside a computer that carry out different functions of the computer.

Thursday, September 24, 2015

systems thinking

1. What is a system?
A system is a combination of parts working together to achieve an end goal.

2. How does it work?
The parts in a system work together and their relationship allows it to work effectively.

3. How do systems relate to computer science?
There are a lot of systems in computer science -- like computers and programs -- so it would be important to understand systems to do well in computer science.