Premium Essay

Lab 1

In:

Submitted By visback
Words 2451
Pages 10
Lab 1: Input, Processing, and Output
This lab accompanies Chapter 2 of Starting Out with Programming Logic & Design.

Name: ___________________________

Lab 1.1 – Algorithms
This lab requires you to think about the steps that take place in a program by writing algorithms. Read the following program prior to completing the lab.

Write a program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate.

Step 1: Examine the following algorithm. (Reference: Designing a Program, page 31).

1. Get the student name. 2. Get the degree program name. 3. Subtract the number of credits taken so far from the required credits for the degree. 4. Get the number of credits required for the degree program. 5. Get the number of credits the student has taken so far. 6. Display the input information in Step 1 and 2. 7. Display the calculated information.

Step 2: What logic error do you spot and how would you fix it?

Step 3: What steps require user interaction (Ex: user must type in some input)?

Lab 1.2 – Pseudocode

This lab requires you to think about the steps that take place in a program by writing pseudocode. Read the following program prior to completing the lab.

Write a program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to

Similar Documents

Free Essay

Nt1210 Unit 1 Lab 1.1

...2000+ | 900 + | 30 + | 1 = | 2931 | 1.1.2 22↓ | 21↓ | 20↓ | | 4X | 2X | 1X | | 1____ | 1____ | 0____ | | 4+ | 2 + | 0 = | 6 | 1.1.3 21↓ | 20↓ | | 2X | 1X | | 1____ | 1____ | | 2 + | 1 = | 3 | 1.1.4 24↓ | 23↓ | 22↓ | 21↓ | 20↓ | | 16X | 8X | 4X | 2X | 1X | | 1____ | 0____ | 0____ | 1____ | 0____ | | 16 + | 0 + | 0 + | 2 + | 0 = | 18 | 1.1.5 27↓ | 26↓ | 25↓ | 24↓ | 23↓ | 22↓ | 21↓ | 20↓ | | 128X | 64X | 32X | 16X | 8X | 4X | 2X | 1X | | 1____ | 1____ | 1____ | 0____ | 0____ | 0____ | 1____ | 0____ | | 128 + | 64 + | 32 + | 0 + | 0 + | 0 + | 2 + | 0 = | 226 | 1.1.6 156 | 28 | 28 | 28 | 12 | 4 | 0 | 0 | | 27↓ | 26↓ | 25↓ | 24↓ | 23↓ | 22↓ | 21↓ | 20↓ | | v | v | v | v | v | v | v | v | | 128x | 64x | 32x | 16x | 8x | 4x | 2x | 1x | | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 = | 10011100 | 128 + | 0 + | 0 + | 16 + | 8 + | 4 + | 0 + | 0 = | 156 | 1.1.7 255 | 127 | 63 | 31 | 15 | 7 | 3 | 1 | | 27↓ | 26↓ | 25↓ | 24↓ | 23↓ | 22↓ | 21↓ | 20↓ | | v | v | v | v | v | v | v | v | | 128x | 64x | 32x | 16x | 8x | 4x | 2x | 1x | | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 11111111 | 128 + | 64 + | 21 + | 16 + | 8 + | 4 + | 2 + | 1 = | 255 | 1.1.8 200 | 72 | 8 | 8 | 8 | 0 | 0 | 0 | | 27↓ | 26↓ | 25↓ | 24↓ | 23↓ | 22↓ | 21↓ | 20↓ | | v | v | v | v | v | v | v | v | | 128x | 64x | 32x | 16x | 8x | 4x | 2x | 1x | | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 11001001 | 128 + | 64 ...

Words: 552 - Pages: 3

Premium Essay

Lab 1

...Unit 1 Labs Lab 1.1 Step 13 Lab 1.2 Define Major Topics for a Database NOUNS | MAJOR TOPIC | Doctors | Patients | Drugs | Side Effects | Researchers | Patient Information | Westlake Research Hospital | Conducting test of new Depression Drugs | Lab 1.3 Create a Statement of Work Scope The Software-Tracking database will be used to help manage the school’s software licensing. The software will be monitored for lifecycle and version corrections as well as keeping track of the number of users accessing the software under the constraints of the license agreement. The faculty and staff computers will be tracked for which version and licensed copy of software is currently running on each system. Constraints The database can be used for accessing the faculty and staff’s logon to the school employee website for the purpose of inputting and updating hours worked. Faculty and staff members can conduct business related work, such as adjusting work schedules, and student’s grades in the system but are not able to view student’s personal files in the registrars system. Objectives * Make for a more efficient system by allowing employees to have control of shared calendars and student’s grades. * Improve the tracking of Software Licensing and the Lifecycle of programs. Tasks and Timeline 1. Gathering Data: Meet with School Board and those involved to discuss the needs and wants for a database. Time Allotted: 3 weeks. Deliverables: A list of interviews...

Words: 365 - Pages: 2

Premium Essay

Lab 1

...Laboratory #1 Lab #1: Evaluate Business World Transformation – Impact of the Internet and WWW Learning Objectives and Outcomes Upon completing this lab, students will be able to complete the following tasks: * Identify the security challenges on the web as they relate to various business models and the impact that is made in e-Commerce and Internet-based deployments * Extract various businesses’ personal identifiable information (PII) that is collected and stored from Internet users by a business in a web application * Distinguish among the different reasons for the attacks on web sites and determine exactly what the attackers are after when they target your WWW presence * Evaluate the current state of security on a LAMP server using Telnet, Skipfish and TCPdump to identify whether the proper tools are installed for a security evaluation of the server * Install and use Firefox Web Browser with the Live HTTP Headers plug-in Lab #1 – Compromised Business Application Impact Analysis Course Name & Number: ______________________________________________________________ Student Name: _______________________________________________________________________ Instructor Name: _____________________________________________________________________ Lab Due Date: _______________________________________________________________________ Overview The threats of the Internet go way beyond an attacker defacing your website. An attack can include the...

Words: 849 - Pages: 4

Free Essay

Lab#1

...IS 3220July 7, 2014 Lab #1 Analyze Essential TCP/IP Networking Protocols 1. What is the purpose of the address resolution protocol (ARP)? ARP is used to mediate between Ethernet (and other broadcast link-level protocols) and the network layer, or IP protocols. Put more simply, ARP converts IP addresses to Ethernet addresses. 2. What is the purpose of the dynamic host control protocol (DHCP)? DHCP (Dynamic Host Configuration Protocol) is a communications protocol that lets network administrators centrally manage and automate the assignment of Internet Protocol (IP) addresses in an organization's network. http://searchunifiedcommunications.techtarget.com/definition/DHCP/ARP. Lab #2 Network Documentation 1. When you TELNET to LAN Switch 1 and LAN Switch 2, why is it a good idea to first PING an IP interface or port’s IP address? The ping verifies connectivity by sending ICMP echo packets to a host and listening for an echo reply. This will detect if there are any name resolution issues. 2. Why is using Telnet a security risk for an IP network infrastructure? Telnet sessions are in clear text and programs such as packet sniff can capture passwords and then use them to log into those sessions. 3. How can you mitigate the security risk caused by Telnet? Intrusion detection is a packet inspection tool that monitors, intercepts and responds to abuse in real time. ICMP inspection permits responses to ICMP packets like ping and traceroute that come from...

Words: 427 - Pages: 2

Premium Essay

Lab 1

...Assessment Worksheet 111 LAB #7 – ASSESSMENT WORKSHEET Relate Windows Encryption and Hashing to Confidentiality and Integrity Course Name and Number: Student Name: Instructor Name: Lab Due Date: Overview This lab demonstrated how hashing tools can be used to ensure message and file transfer integrity and how encryption can be used to maximize confidentiality. Common hashing and encryption tools, including MD5, SHA1, and GnuPG, were used. You used GnuPG to generate both a public and private key and a secret key for encryption only. Lab Assessment Questions & Answers 1. If you and another person want to encrypt messages, should you provide that person with your public 7 Relate Windows Encryption and Hashing to Confidentiality and Integrity key, private key, or both? You should both provide each other with your public keys. 2. What does GPG allow you to do once it is installed? GPG allows you to encrypt and decrypt data and generate public and private keys. 3. Name two different types of encryption supported by GPG for your key. GPG supports symmetric ciphers DES and Blowfish as well as asymmetric ciphers ELGamal and RSA. 112 LAB #7 | Relate Windows Encryption and Hashing to Confidentiality and Integrity 4. What happens when you sign and trust a new key to your keychain? A new private and public key is created with a fingerprint for non repudiation. 5. If a user sends you his/her public key, will he/she be able to decrypt your encrypted...

Words: 472 - Pages: 2

Premium Essay

Lab 1

...lExercise 10: Acid-Base Balance: Activity 2: Rebreathing Lab Report Pre-lab Quiz Results You scored 100% by answering 4 out of 4 questions correctly. 1. In cases of acidosis, the pH of the blood is You correctly answered: c. less than 7.35. 2. Carbon dioxide and water form You correctly answered: a. carbonic acid (a weak acid). 3. Which of the following is true of respiratory acidosis? You correctly answered: c. The amount of carbon dioxide in the blood is greater than normal. 4. Rebreathing You correctly answered: b. is exemplified by breathing into a paper bag. 01/09/14 page 1 Experiment Results Predict Question: Predict Question: What do you think will happen to the pH and PCO2 levels during rebreathing? Your answer : b. pH will decrease and PCO2 will increase. Stop & Think Questions: Which of the following can cause respiratory acidosis? You correctly answered: c. airway obstruction Experiment Data: Condition Normal Rebreathing Min PCO2 40 40 Max PCO2 40 53.02 Min pH 7.40 7.24 Max pH 7.40 7.42 01/09/14 page 2 Post-lab Quiz Results You scored 100% by answering 4 out of 4 questions correctly. 1. Rebreathing simulates You correctly answered: a. hypoventilation and respiratory acidosis. 2. Hypoventilation results in You correctly answered: c. an accumulation of carbon dioxide in the blood. 3. The renal system can compensate for respiratory acidosis by You correctly answered: b. excreting H+ and retaining bicarbonate ion. 4. Respiratory acidosis can be caused...

Words: 381 - Pages: 2

Free Essay

Lab 1

...Post-Lab Questions 1. What were your controls for this experiment? What did they demonstrate? Why was saliva included in this experiment? This experiment is looking for amylase in-particular. The first control was a negative control, Water ,this would show there is no Amylase present. The second control would be a Positive control ,the starch solution this would show the presence of the enzyme amylase. The negative control water does not contain starch. Saliva contains Amylase this is why it is included in the experiment. The saliva is a positive because it turned yellow, this shows no starch left because the amylase broke it all down. 2. What is the function of amylase? What does amylase do to starch? The function of amylase is to start the digestion proses. Amylase function is to break down starch to sugar. 3. Which of the foods that you tested contained amylase? Which did not? What experimental evidence supports your claim? The cooked rice contained Amylase and the starch solution contained amylase. The water the Apple contained no starch. 4. Saliva does not contain amylase until babies are two months old. How could this affect an infant’s digestive requirements? Usual babies do not start eating food until three months. The reason there saliva does not contain amylase is because there bodies have not started producing it yet. For there digestion it means they will not break down any starch foods and just pass them trough there body...

Words: 630 - Pages: 3

Free Essay

Lab 1

...Lab 1 HIPPA IT Asset Description | Seven Domains of typical IT | Privacy Data Impact | Assessment | Critical- Major-Minor | | ASA_5505 | LAN-WAN | Authentication | Major | ASA_Instructor | LAN-WAN | Authentication | Major | ASA_Student | LAN-WAN | Authentication | Major | Cisco_2811 | WAN | Packets | Major | Workstations | Workstations | Identification | Minor | LAN Switch 1 | LAN | FTP | Minor | LAN Switch 2 | LAN | FTP | Minor | Norfolk | WAN | Packets | Critical | Tampa | WAN | Packets | Critical | Indy | WAN | Packets | Critical | Seattle | WAN | Packets | Critical | West Covina | WAN | Packets | Critical | User | User | Email | Minor | Remote Access | Remote Access | P to P Information | Major | Questions : 1. It helps identify areas of potential risks. 2. The purpose of an asset classification is to evaluate the health of the company by examining how well each of the company's type of assets is performing 3. HIPPA – identify health care patient files, protect health information for not to be expose to others without concern of the patient and the fallow the ePHI law`s 4. HIPPA website is a minor but it do not make it major because it can`t be hacked or harm, also a e-commerce we have to be very careful what we promote or what we put on place. 5. Because is private HIPPA secure the information for not to be expose 6. Updates,Firewalls make sure data is in place 7. Data strategies differ greatly from one organisation...

Words: 369 - Pages: 2

Premium Essay

Lab 1

...Lab 1 1. Reconnaissance, Scanning, Gaining Access, Maintaining Access, and Covering Tracks 2. You need to do a lot of reconnaissance like network scanning, social engineering, and dumpster diving. 3. A hacker can use tools like Netcraft and PCHels to report on your domain, IP number, and operating system, tools such as NMap identify your host systems and services, tools like LANguard Network Scanner identify system vulnerabilities, and tools such as AET Network Scanner 10, FPort 1.33, and Super Scan 3 scan your devices to determine ports that are open and can be exploited. 4. A social engineer is a person who smooth-talks people into revealing information such as unlisted phone numbers, passwords, and other sensitive information. 5. Enumeration is a process to gather the information about user names, machine names, network resources, shares and services. 6. Once the attack is done the hacker will cover his tracks by modifying the log files, using Trojans to destroy system logs or replace system binaries at the same time, and other techniques like steganography and tunneling. 7. When covering up their tracks a hacker can use rootkits that can disable logging altogether and discard all existing logs making it a lot easier to do it again. 8. You should continue testing and report your findings when you finish. 9. NIST Special Publication 800-115 10. Planning, Discovery, Attack, and Reporting 11. To find out if they are vulnerable to attack before they actually get attacked...

Words: 276 - Pages: 2

Free Essay

Lab 1

...Lab One: Design a Research Project Hypothesis: Jewelweed juice speeds up healing of the rash caused by Western Poison Ivy. Research Proposal: This study is extremely valuable for the sole and simple reason that approximately 85 percent of the population will develop an allergic reaction if exposed to poison ivy, or poison oak according to the American Academy of Dermatology. As a researcher for a pharmaceutical company, this information will aid in the validity of the claim and marketing of the product. This research will also benefits humanity in general by providing a safe and effective cream as an aid in the healing process after exposure. Ten subjects will be selected after careful interviews regarding allergies to food, medication, or anything else. A thorough medical history review will be made to ensure healthy individuals participate. Any subject with history of severe allergic reactions of any kind will not be allowed to participate. Subjects cannot not be taking any medications or have signs or symptoms of illness at the start of experiment. Baseline vital signs and blood test will be performed: CBC & Chem 10. The subjects must be able to commit for a period of 21 days, and should not be claustrophobic. The age group will be either males or females ages 18-55. The controlled variable is the location that the subjects will remain in. This will be a carefully monitored area where ambient temperature, sleeping and waking hours will be the same, as...

Words: 549 - Pages: 3

Premium Essay

Lab 1

...Lab Report 1: Pipettes and Std Curve Ingrid Simons University of Texas at El Paso June 12, 2014 Introduction: Procedures that require very small volumes of DNA and reagents are performed with instruments such as, micropipettes and pipettes. These instruments are used when scientists need to accurately and precisely deliver small volumes of a liquid. Molecular biologists use very small volumes of liquid at times they are as small as 0.1 µL, in order to do these measurements the use micropipettes. The function of the micropipettes is to act as a plunger when the depressed by the thumb and by its release liquid is drawn into a disposable plastic tip. The liquid is released when the plunger is pressed again (The University of QueensLand). The tip is an important part of the micropipette, each tip is disposable and come in different sizes depending of the micropipette being used. There is three standard micropipettes, the P20 which measures 0.5-20μL, P200 that measures 20-200 μL, and P1000 that measures 100 μL to 1 mL. An important part of this laboratory was learning how to read the meniscus curve. A meniscus is a curve that is formed at the surface of a molecular substance, such as water, when it touches another material (USGS). Meniscus is caused by adhesion, a result of water’s high surface tension. The glass beaker attracts water molecules, and water molecules stay together, as a result many molecules gather to touch the glass. They will accumulate along the...

Words: 886 - Pages: 4

Free Essay

Lab 1

...NT1430 Linux Administration LAB 4 vi -- again On your linux server enter the following in the command line: root@servername: cd /opt root@servername: ls -la 1) Write what files exist in your directory. root@servername: touch sysinfo root@servername: ls -la 2) Write what files exist in your directory. 3) What are the permissions on the file you have just created? root@servername: chmod 755 sysinfo root@servername: ls -la 4) What are the permissions on the file you have just created? 5) What have you just done? Practical Mysystem root@servername: vi mysystem Now to enter into insert mode (edit mode) hit [i] to exit back into command mode hit [Esc] Now while you are in INSERT MODE type the following, be careful of all characters and typos. #!/bin/bash clear printf "This is information provided by mysystem.sh. Program starts now.\n" printf "Hello, $USER.\n\n" printf "Today's date is `date`, this is week `date +"%V"`.\n\n" printf "These users are currently connected:\n" w | cut -d " " -f 1 - | grep -v USER | sort -u printf "\n" printf "This is `uname -s` running on a `uname -m` processor.\n\n" printf "This is the uptime information:\n" uptime printf "\n" printf "That's all folks!\n" To end and save the file enter the following: [Esc] [:] You will exit Insert Mode and enter into Command Mode then save and exit vi: wq [Enter] Now run the script. root@servername: chmod 755 mysystem root@servername: ./mysystem Print a screen shot of the results. sysinfo root@servername:...

Words: 1450 - Pages: 6

Premium Essay

Lab 1

...videos created by the APUS Online Library to assist you in locating trustworthy resources. Then, you will use the information you learned from the videos to identify, analyze, and synthesize your research.   Visit the COLL 100 Course Guide at http://apus.campusguides.com/COLL100. On the Home page of the site locate and click on the “library tour” inside the “Welcome to the COLL100 Course Guide!” box. View all five videos – “Start here!”, “Articles”, “eBooks”, “Websites”, and “Library Help” and address the questions for the assignment. Scripts are available for each video under the “Need a transcript?” section of the web page. After review of the library tour videos please use this template to answer the following five questions:    1. Watch the “Start here!” video first then, based on what you learned from the video, explain the deep web. * The “deep web” allows APU/AMU students to search for more specific information than they can find on other search engines. The resources are often specific to what the user is looking to...

Words: 871 - Pages: 4

Premium Essay

Lab 1

...The operating system that we use on our computers is the most important program that we have. Every computer used for home or business must have an operating system to run other programs. They perform basic tasks and recognize the input from the keyboard and output to the display screen. They keep track of files stored on your computer and control disk drives and printers. (Beal, N.D) There are five basic functions of an operating system. They are: * Booting the computer * Performing basic computer tasks like the mouse and keyboard * Provides a user interface such as a command line or a graphical user interface * Handles system resources such as a computer’s memory * Provides file management which is the way the operating system manipulates, stores, finds and saves data (N.A., N.D.) The difference between Windows, Linux and Mac OS is that windows is designed to run on PC’s. All three are operating systems, but the internal architectures are different in each. And PC’s are very inexpensive for a basic model. (Sinoun, 2011) The Windows operating system is pretty versatile, and can be installed on PCs having variable amounts of resources. There are versions of Windows that can be installed on PCs having as little resource as 233 MHz processor and 64 MB RAM. Windows users get good choices for their operating systems, based on the system resources they have. An even greater benefit of Windows users is the user-friendliness of the operating system. The graphical...

Words: 789 - Pages: 4

Premium Essay

Lab 1

...DL-21SC (3-15) W BsIlI:frlY,?-T,'fu,". sELF-CERTT FTCATTON OF VEHTCLE(S) OWNED/OPERATED PLEASE TYPE OR PRINT IN BLUE OR BLACK INK ALL INFORMATION A DRIVER INFORMATION Driver License Number Name Sl*ro,,,r, AddfeSS: A k Po. Box number may be used in addition to the aclual residence address, bul cannot \qo'H.:':i^""''{9"6o^- Llub B A( St^ar0n Ar-K K s ult ( State Citv (Y\a;o\loa:ru (, .{ 6 I Zio Code IPA IIs:{6t VEHICLE INFORMATION (list all vehicles owned or permitted to operate) Plate # Title # VIN # Year/Make # Title # VIN # Year/Make Plate # Tltle # VIN # YearlMake Plate l--l Viotation occured prior to 1ol1tos c STATEMENT OF OWNERSHIP/NON-OWNERSHIP lctrecr appropriate box and comptete statement) w , hereby state that I own/or have permission to operate the vehicle(s) listed above. PLEASE PRINT NAME E, E, , hereby state that I do not own any vehicle(s). PLEASE PRINT NAME PLEASE PRINT NAME hereby state that my income meets the guideline established for an economic hardship. PLEASE PRINT NAME hereby state that the vehicle(s) titled/registered in my name is/are inoperable. E' I certify that all information given on this statement is true and correct. I hereby authorize the Department to furnish the lgnition Vendor with icle- record for the purpose of processing this form. I- V- ro DATE SIGNATURE IN INK WARNTNG: Misstatement...

Words: 711 - Pages: 3