News
03-19-09: I will be in my office (Kemper Hall, Room 3106) between 10:00 am and 12:00 pm for office hour
03-05-09: There will NOT be class on Monday, March 9.
02-03-09: Midterm will be on Wednesday, February 11.
I will put here a list of questions similar to the ones that will be on the midterm:
- If you are using a desktop, and there is a power outage, which part of the desktop is more prone to have a problem?
- In case of power outage, all mechanical pieces are at risk; the biggest risk is for the hard drives
- Same question, for a laptop
- Laptops are more protected as they get their power from the battery; the latter is at risk if there is a power outage
- What is "thrashing"?
- when a computer has used up all RAM memory available, it will use hard disk space as memory: this is thrashing
- What is dualboot?
- dualboot means that two (or more) operating systems are available on a computer
- What is the Master Boot Record (MBR)?
- The MBR is the main record that gives information to the BIOS on where to find the operating system (s)
- What is the difference between an assembly language and a machine language?
- Machine language is a binary language, while assembly language is a low level language based on English
- If you buy a computer in Europe, will you be able to use it in the US?
- Yes you will; the only problem you may encounter relates to the power supply
- DVDs are protected with a system of zones. The zone information is available: on the DVD alone, on the DVD player only, or on both?
- The zone information is encoded on the DVD and on the DVD player
- Python is a compiled language or an interpreted language?
- Python is an interpreted language
- What is the binary representation of the hexadecimal number 2C ?
- 00101100
- What is the difference between hardware and software ?
- Hardware relates to everything material, while software is immaterial
- What is the binary representation of the hexadecimal number 32 ?
- 00110010
- For any number N given in decimal form, how do you find the last bit of its binary representation?
- If N is even, the last bit is 0 and if N is odd, the last bit is 1
- Can the BIOS turn off your computer?
- No it can't: BIOS only starts the computer
- Can you run a 64 bit application on a 32 bit operating system?
- No you can't; the reverse however is possible: you can run a 32 bit application on a 64 bit system
- What is Moore's law
- Moore predicted in 1965 that the number of transistors in a CPU would double every year
- What is swap space?
- Swap space is space allocated on hard drives to serve as memory should the computer thrash
- What is a heat sink?
- The heat sink sits on top of the CPU to help cooling
- If your desktop computer does not start, what would you suspect first?
- If nothing happens when you turn on your computer, you should first suspect the power supply (it could even be that the power cord is disconnect!)
- If your laptop computer does not start, what would you suspect first?
- Laptops have batteries, but the probability that the battery goes suddenly wrong is small (its charge could be 0 however). I would suspect: screen problem, disk problem ....
- What is the difference between IDLE and Python?
- Python is a programming language, while IDLE is an Integrated Development Environment for Python (i.e. IDLE is a platform for developing Python programs)
- In Python, if a and b are integers, what is the meaning of a%b ? What is the meaning of a/b ?
- a%b means the remainder of the division of a by b; for example, 5%3=2 (5 divided by 3 equals 1 remainder 2)
- a / n means the quotient of the division of a by b : 5/3 = 1, 2/3 = 0, 10/2 = 5 ...
- In Python, how to you set a string in upper case?
- If A is a string, A.string() sets it uppercase
- In Python, what is the difference between a tuple and a list?
- Tuples and lists stores multiples values; tuples are immutable (i.e. cannot be changed), with lists are mutable (i.e. can be changed)
- In Python, how do you sort a list?
- If A is a list, A.sort() will sort it: in increasing order if it contains integers, in alphabetical order if it contains strings.
- In a computer, what is the Northbridge?
- The Northbridge is a controller hub (or bridge) for the connections between the CPU, memory, video card, and the Southbridge (note that there are no WestBridge or Eastbridge in a computer!)
- In Python, what is the difference between "mutable" and "immutable"?
- "mutable" means that the content can be changed (such as for a list), while "immutable" means the content cannot be changed (such as for a tuple).
- In Python, how do you reverse a string?
- There are many ways to do this, but the simplest is: if A is the string, B=A[::-1] is its reverse.
- What is a GPU?
- The GPU, or Graphics Processor Unit, is the processor on the video card used for graphics
- How can a computer remember time and date even after it is turned off?
- On the motherboard, there is a small battery (of the type found in cameras) for low level maintenance, such as keeping track of time.
- What is the difference between RAM and ROM?
- RAM, or Random Access Memory, is used as main memory on a computer; it is volatile
- ROM, or Read Only Memory, is used for storage; its data cannot be erased
- Identify these three types of arrays: (..), [..]. {..}
- An array defined by parenthesis, (...) is a tuple, i.e. an array that is "immutable"
- An array defined by brackets, [...], is a list, i.e. an array that is "mutable"
- An array defined by curly brackets, {...}, is a dictionary, i.e. an array whose elements are indexed by keys.
- In Python, how do you convert a string into an integer? into a float?
- If A is a string, then int(A) will convert it into an integer, and float(A) converts it into a decimal number, or float.
- In Python, how do you convert a list of strings into integers? into floats?
- If A is a list of strings, then:
- B = map(int,A) is the list of corresponding integers
- C = map(float,A) is the list of corresponding floats
- If A is a list of strings, then:
- In Python, what to you need to do to compute the square root of a number?
- Python does not know the mathematical functions by default: you have to explicitly load the math function. You should use both: import math and from math import *. Then the square root is computed using the function sqrt (for example sqrt(2)), which can also be written math.sqrt() (for example math.sqrt(2)).
- What is the difference between DOS and Windows?
- DOS (for Disk Operating System) is an operating system, while Windows is a graphical interface running under DOS.
- What is the difference between Unix and Linux?
- Unix is a commercial Operating System, while Linux is a free, Open Source Operating System.
- Besides DOS, UNIX and Linux, do you know any other operating system?
- Mac OsX
- What is a byte?
- A byte is 8 bits; it is a standard unit of size for storage devices and memory.
- What is "QWERTY"?
- "QWERTY" is the standard layout of a keyboard for the English alphabet.
- Which of these numbers is most likely in binary form: 123, 101, 7B, 8 ?
- 123, 7B and 8 are definitely not binary; so the answer would be 101.
01-05-09: Classes start! look at the Information sheet
Happy New Year 2009!!