Eva's Computer Science Portfolio
Wednesday, January 13, 2016
Difference Between For and While Loop
For Loop
A loop is a fixed repetition. It 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 while loop body.
Wednesday, November 11, 2015
Wednesday, November 4, 2015
Input and Output
Input Devices
- Graphics Tablets
- Cameras
- Video Capture Hardware
- Barcode reader
- Digital camera
- Gamepad
- Joystick
- Keyboard
- Microphone
- Mouse (pointing device)
- Scanner
- Webcam
- Touchpads
- Pen Input
- Electronic Whiteboard
Output Devices
- Monitor
- Printers (all types)
- Projector
- Speaker(s)
- Radio
- LCD Projection Panels
- Plotters
- Computer Output Microfilm (COM)
Input and Output Devices
- Medems
- Network cards
- Touch Screen
- Headsets (Speakers and Microphone)
- Fascisimile (FAX)
- Audio Cards/Sound Card
- USB
Wednesday, October 28, 2015
Bits/Bytes/Compiler & Interpreter
A compiler is a program converts the code into binary, and an interpreter is another program that translates from one code to another. A bit is an aspect to binary code, they are the 1's and 0's. A byte is composed of eight bits. If I want to type the letter "A", it very quickly converts the letter into binary.
1 = On
0 = Off
Computer Architecture: My Perspective
I have no idea what computer architecture is. However, I imagine it to be creating different parts and putting them together to make a product. In computer science class, I think we learn how to utilize computer architecture.
How does the computer understand what I type?
It understands what I type because in its software it is programmed to recognize i.
Wednesday, September 23, 2015
Systems Thinking
1. What is a system?
- A system is a set of connected things forming a complex whole.
2. How does a system work?
- A system works by having modules (which can have sub-modules), which do specific things to help make the system work smoothly.
3. How does a system relate in computer science?
- It relates because computer science requires a lot of systems, such as a coding system.
- A system is a set of connected things forming a complex whole.
2. How does a system work?
- A system works by having modules (which can have sub-modules), which do specific things to help make the system work smoothly.
3. How does a system relate in computer science?
- It relates because computer science requires a lot of systems, such as a coding system.
Subscribe to:
Posts (Atom)