Difference between For Loop and While Loop
For Loop
- a fixed repetition loop
- will run the given number of times no matter how the body of for loop code changes the values of the variables
If you have a constant (eg. Max students), you can run the For Loop for that many times. You can change the value of the constant. Every year you can change the value of Max students.
The counter value increases or decreases depending upon the for loop min, max, incremented or decremented values automatically as stated per requirement-no separate statement is made within the body of for loop.
A separate variable is needed most times to run a For Loop.
A For Loop can also start with a maximum value and decrease each time the body of the loop is executed.
While Loop
While loop can have various conditions and they can be joined (AND OR). The control enters the loop body only when the condition is met. If the condition is not met, the control goes to the statement following the end of the while loop body. A statement within the while loop changes the criteria and that actually moves the control out and to the statements that are following the end of the while loop body.
8cs220katelync
Tuesday, May 17, 2016
Wednesday, April 13, 2016
Computer Architecture Notes
Input Devices
Graphics 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
Output Devices
Monitor
Printers (all types)
Plotters
Projector
LCD Projection Panels
Computer Output Microfilm (COM)
Speaker(s)
Radio
Both Input-Output Devices:
Modems
Network cards
Touch Screen
Headsets (consisting of speakers and microphone)
facsimile (FAX) - has scanner to scan document and also printer to print the document)
audio cards/sound card
USB
Volatile Programming: stored in RAM
- the data used from the programs is stored in RAM
CPU - central processing unit
-2 components
- Control Unit (executes the program line-by-line and works as an interface between input/output devices, ALU, and RAM)
- Arithmetic Logic Unit (performs arithmetical calculations and evaluates logical statements)
Graphics 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
Output Devices
Monitor
Printers (all types)
Plotters
Projector
LCD Projection Panels
Computer Output Microfilm (COM)
Speaker(s)
Radio
Both Input-Output Devices:
Modems
Network cards
Touch Screen
Headsets (consisting of speakers and microphone)
facsimile (FAX) - has scanner to scan document and also printer to print the document)
audio cards/sound card
USB
Volatile Programming: stored in RAM
- the data used from the programs is stored in RAM
CPU - central processing unit
-2 components
- Control Unit (executes the program line-by-line and works as an interface between input/output devices, ALU, and RAM)
- Arithmetic Logic Unit (performs arithmetical calculations and evaluates logical statements)
Wednesday, April 6, 2016
Fundamentals of Computer Architecture
Computers do not react to anything except for being either on or off - everything else is programmed by a human.
0 - OFF
1 - ON
(states => binary)
0 bit
1 bit
EVERY SYMBOL on your keyboard is called a character - including the space bar, A-Z, a-z, 0-9, special symbols (!@#$%, etc.)
8 bits = 1 byte (ex. 01010010 = A)
Every character on the keyboard is represented by a byte.
The operating system does resource management - already stored in machine - helps computer wake up, shut down, connect to printers, keyboard, mouse, etc.
When a person types out any character on the keyboard, electrical pulses are either sent in or NOT sent in based on the combination of bits used for the character.
A compiler takes in the high level language from the user (ex. java program), checks it for any errors, displays them to the user to correct them, and then converts the ENTIRE program into object code/binary code/machine code once everything is corrected.
A interpreter is a program that takes in the high level language and coverts it instantly LINE BY LINE into machine language. It shows errors in the input as soon as it is typed.
Source Code --> Compiler/Interpreter --> Object Code 1010011...
(Object Code: Binary Code/Lang, Machine Code/Lang executable)
High Level Lang: Java, C++, Python, etc.
Application Software & System Software
application software: software that applies only to that application (ex. banking system, hospital management system, etc.)
system software: (ex. operating system, compiler, drivers, etc.) designed to run a computer's hardware and application programs
Operating System:
booting: system checks whether everything is working
0 - OFF
1 - ON
(states => binary)
0 bit
1 bit
EVERY SYMBOL on your keyboard is called a character - including the space bar, A-Z, a-z, 0-9, special symbols (!@#$%, etc.)
8 bits = 1 byte (ex. 01010010 = A)
Every character on the keyboard is represented by a byte.
The operating system does resource management - already stored in machine - helps computer wake up, shut down, connect to printers, keyboard, mouse, etc.
When a person types out any character on the keyboard, electrical pulses are either sent in or NOT sent in based on the combination of bits used for the character.
A compiler takes in the high level language from the user (ex. java program), checks it for any errors, displays them to the user to correct them, and then converts the ENTIRE program into object code/binary code/machine code once everything is corrected.
A interpreter is a program that takes in the high level language and coverts it instantly LINE BY LINE into machine language. It shows errors in the input as soon as it is typed.
Source Code --> Compiler/Interpreter --> Object Code 1010011...
(Object Code: Binary Code/Lang, Machine Code/Lang executable)
High Level Lang: Java, C++, Python, etc.
Application Software & System Software
application software: software that applies only to that application (ex. banking system, hospital management system, etc.)
system software: (ex. operating system, compiler, drivers, etc.) designed to run a computer's hardware and application programs
Operating System:
booting: system checks whether everything is working
Wednesday, March 9, 2016
Points to Consider for Presentation
Some points I would consider to keep my audience engaged during the presentation:
- public speaking skills (eye contact, volume, changing pitch)
- fun pictures and slides
- jokes, humor
- interesting information
- look interested in the information yourself
Guy Kawasaki's 10 20 30 rule:
- keep a maximum of about 10 slides for the whole presentation
- use around 20 minutes to present the whole presentation
- use (at least) 30 point font
- bigger font makes you write less
- get to know your actual content
Wednesday, March 2, 2016
Software Approach, Top Down Design
One way of coding is to simply have a rough idea of what you want to do and then start typing away to produce one huge source file.
This is a very bad idea.
The resulting code is likely to have many issues with it that include:
This is a very bad idea.
The resulting code is likely to have many issues with it that include:
- Poorly documented code, so very hard to maintain and update
- 'Spaghetti code' - which means a tangled mess of jumps and loops all over the code, very hard for someone to understand. Even by the original coder a few days later!
- Duplication of code, so wasting memory and running speed
- Very hard to develop by more than one person as there is only one file
- Very hard to debug - te
Systems Thinking
What comes to your mind when you hear the work system. What is a system? How does it work?
When I hear "system," technology like computer programs comes to mind, and the ecosystem in nature. I think systems are the technology that run programs. We write in the computer's language to tell the programs what to accomplish and how to function. In a system, all components are connected to run a program.
When I hear "system," technology like computer programs comes to mind, and the ecosystem in nature. I think systems are the technology that run programs. We write in the computer's language to tell the programs what to accomplish and how to function. In a system, all components are connected to run a program.
- system-working together to function (ex. computer)
- have same names for same data (ex. FName/LName, FirstName/LastName)
Subscribe to:
Comments (Atom)


