






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Talking about most basic topics in computer science
Typology: Schemes and Mind Maps
1 / 10
This page cannot be seen from the preview
Don't miss anything!







MEMORY UNIT (week 4) Computer memory is the storage space in the computer where the data to be processed and the instructions required for processing are stored. TYPES OF MEMORY There are basically two major types of memory, which includes: Primary memory (main memory) Secondary memory (external storage) PRIMARY MEMORY Also known as the main memory is the storage in the computer in which data is stored for quick access by the CPU and are connected via a memory bus. The primary memory is divided into two: i. Random Access Memory (RAM) The RAM is the volatile memory that temporarily stores data and instruction currently being used by the computer. It is called volatile because the content of it disappears when the computer is turned off or there is loss of power supply. ii. Read Only Memory (ROM) The ROM is the non-volatile memory that stores small program that the computer can use to perform some of the basic operations required to initiate the boot process. The content of the ROM are often times stored by the manufacturer of the system and always permanent. Since the content of it can only be read, they are called Read Only. Have you ever seen the black/blue background with some information during the booting process? That’s the content of the ROM being displayed. SECONDARY MEMORY This is the permanent, non-volatile memory that is not directly accessed by the computer/processor. Before the content of the secondary memory can be used by
the computer, it must be copied into the RAM. It has the capacity to store huge amount of data. The secondary storage is the slowest and cheapest form of memory. Examples of secondary storage include Hard Disk (Local Disk), Optical disk (CD, DVD), Floppy Disk, USB flash drive, memory card etc.
Secondary memory is a type of memory that provides long-term storage for data and programs. It is not directly accessible by the CPU and is used to store data that is not currently being actively processed. There are various types of secondary memory: i) Flash Drive: A flash drive, also known as a USB drive or thumb drive, is a portable storage device that uses flash memory to store data. It is removable, lightweight, and can be easily connected to computers through USB ports. Flash drives are commonly used for transferring files and creating backups. ii) Hard Disk Drive (HDD): A hard disk drive is a magnetic storage device that uses rapidly rotating disks coated with magnetic material to store data. HDDs offer large storage capacities at relatively lower costs. They are commonly found in desktop computers and servers, providing both primary and secondary storage options. iii) Compact Disk (CD): A compact disk is an optical storage medium that uses laser technology to read and write data. CDs are used for storing music, software, and various types of data. There are different types of CDs, such as CD-ROM (Read-Only Memory), CD-R (Recordable), and CD-RW (Rewritable).
The components of the CPU work together to achieve its functions. The three components are:
Correction of wring spelling Inclusion of graphics Examples of word processor: WordPerfect, WordStar, MS-word,Lotus Notes, Corel Word Perfect Script, Ami-Pro,Word Craft, Notepad, WordPad, WordPro, Multimate advantage, Professional Writer. Microsoft Word is a word processor designed by Microsoft Corporation USA. It is the most common word processor today because its special features. It comes in a software suite called Microsoft Office. Some versions of Microsoft Office are: Ms Office 2000, Ms Office 2003, Ms Office 2007. FEATURES OF WORD PROCESSING PACKAGES WORD WRAP - Instead of pressing ‘Enter key’ at the end of every line while typing, word wrap automatically moves the insertion point to the next line when you reach the end of the current line and allows you to continue typing without having to press the ‘Enter key’ to start a new line. EDITING OF DOCUMENT – Once you have finished typing your document, you can then use WORD basic editing techniques. These include inserting text, deleting text, moving paragraphs from one position to another, etc. DELETING TEXT – Word processing features allows for deletion, that is, the removal of unwanted text. Some can be deleted using ‘delete key’ while you can also press ‘back space key’ to delete text depending on where you place the cursor before deletion. INSERTING TEXT – The process of adding text in-between existing text; it could be a character or a full statement. PAGE FORMATING – This is the standard setting of page format. Information in page formatting include the length of each line, number of lines per page, the size of the margins and line spacing. SPELLING CHECKER – This is a program to detect and correct wrongly spelt words. Spelling programs read word processing files and compare each word to the computer dictionary. It then underlines any wrongly spelt word and gives suggested spelling options. SAVE AUTO RECOVER – When you are working, you can sometimes forget to save regularly, which could mean you lose your work since that lat time you saved in the event of power outage. Microsoft Word provides an automatic save feature that you
PYTHON WHILE LOOP (week 9) What is While Loop in Python? A Python While Loop is a flow control statement that executes a block of code repeatedly as long as a given condition remains True. It is helpful where the number of iterations that are needed is not known, e.g., when waiting for proper user input or processing data until a given condition is satisfied. The loop starts with the while keyword and a condition. The indented code block is executed again and again until the condition is False. To prevent infinite loops, the condition must be changed within the loop, typically by adjusting a variable that appears within the condition. While Loop is used to execute a block of statements repeatedly until a given condition is satisfied. When the condition becomes false, the line immediately after the loop in the program is executed. Here, the condition for while will be True as long as the counter variable (count) is less than 3. count = 0 while count < 3: count = count + 1 print("Hello Geek")
Hello Geek Hello Geek Hello Geek Syntax
while expression: statement(s) Parameters: condition a boolean expression. If it evaluates to True, code inside the loop will execute. statement(s) that will be executed during each iteration of the loop. Flowchart of While Loop whileloop While Loop Infinite while Loop An infinite loop is a loop that keeps running continuously because its condition always remains True. Such loops do not stop on their own and continue executing until the program is manually terminated. age = 28 while age > 19: print('Infinite Loop') Explanation: Here, the condition age > 19 is always True because the value of age never changes inside the loop. Therefore, the loop runs infinitely. Using with continue statement Continue statement is used to skip the current iteration of the loop and move directly to the next iteration. i = 0 a = 'geeksforgeeks' while i < len(a): if a[i] == 'e' or a[i] == 's':
i = 0 while i < 4: i += 1 print(i) break else: print("No Break")
No Break 1