Premium Essay

Lab Solution

In:

Submitted By Mar3420
Words 2312
Pages 10
Solutions
Lab 1: Input, Processing, and Output

Note to Instructor: This lab accompanies Chapter 2 of Starting Out with Programming Logic & Design. Material in the chapter should have been covered prior to lab assignment. In addition, students should have had instruction on using a flowcharting application such as Raptor and instruction on using the IDLE environment for Python.

Evaluation: The instructor should be present to answer any questions and observe the student performing the lab. The student should turn in a hard copy (paper) or soft copy (email) of their work. To minimize the number of attachments or individual files created for this lab, space is set aside in the lab for students to insert completed exercises. Directions are provided to students on copying and pasting.

Learning Objectives for this lab include: 1. Identify pseudocode keywords. 2. Identify flowcharting symbols. 3. How to declare variables with appropriate data types. 4. How to assign values to variables. 5. How to take in input from the computer user. 6. How display output to the screen. 7. How to document code. 8. How to process calculations.

Lab 1.1 through 1.4 uses the following programming problem.

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.

Lab 1.5 and 1.6 are Programming Challenge Problems.

Students were asked to write the Algorithm, Pseudocode, Flowchart, and Python code for the Programming Challenge problems.

Lab 1.1 – Algorithms

Step 1: Examine the following algorithm. (Reference: Designing a

Similar Documents

Premium Essay

Effect Of Solute Concentration On Egg Osmosis

...The data solute concentration of the egg was found by taking the average percent change in mass for each percent solute concentration used in the lab and putting the data into the graph(Mass vs. Solute Concentration Over 3 Days). According to the data from the class, the solute concentration inside an egg is 25.1%. The egg would be in an isotonic solution at 25.1% solute concentration. This is when the concentration outside the egg is equal with the concentration of water inside the egg. The point of equilibrium is the point at which the trendline crosses the x-axis. At this point, the egg would no longer gain or lose mass. If the concentrations are the same inside and outside the egg, diffusion will not be able to take place. All averages...

Words: 318 - Pages: 2

Free Essay

Lab Report

...Osmosis Introduction: Tissues are made up of cells that have the same structure and function. In this experiment osmosis will be measured in a piece of tissue. Water potential can be determined by the changes in dimensions of the tissues when it is placed in solutions of different concentrations. Research Question: What is the effect of sucrose solution on potato cells Hypothesis: Osmosis will increase when the solutions are less concentrated with sucrose Variables: Dependant: Osmosis Independent: Length Materials: 12 large test tubes or specimen tubes with bungs, marker pen, potato chip cutter, scalpel, fine forceps, 3 watch glasses or petri dishes, ruler, 6 labeled beakers one containing 50cm^3 of distilled water and other four containing 50cm^3 of 0.2 mol dm^-3, 0.4 mol dm^-3, 0.6 mol dm^-3 and 0.8 mol dm^-3. Method: 1- Using the potato chip cutter, cut 24 chips from the potato. Cut the chips into 5cm lengths using the scalpel. Be as accurate as possible. Place 4 chips into each of six, labeled test tubes, one test tube for each of the different sucrose solutions. Pour in enough of each respective solution to cover the potato tissue. Put a bung in each one of the test tubes and label this series “potato”. 2- Repeat the method using the apple fruit or turnip root, putting four chips of tissue 5cm long into each of the second series of test tubes. Label these tubes “apple” or “turnip”. 3- Leave the tubes for at least an hour 4- After at least...

Words: 604 - Pages: 3

Premium Essay

AP Biology: Diffusion And Osmosis

...within the bag equal to the concentration outside the bag. The glucose solution moved out of the bag making glucose present in the beaker. The glucose moved to make the solute concentration inside and out equal. If the initial and final % concentration of glucose and IKI for in the bag and in the beaker were given they...

Words: 1292 - Pages: 6

Premium Essay

Egg Sucrose Lab Report

...Design Independent Variable: Amount of sucrose in each solution Dependent Variable: Percent difference in mass of each egg after soaking in the sucrose solutions Experimental Question: If we change the amount of sucrose in each solution that the eggs will sit in, how will this affect the difference in the mass of the eggs? Hypothesis: If an egg is placed in a 4 M sucrose solution overnight, then that egg would lose a greater percentage of its mass than the eggs placed in any other solutions tested, because the solution it is in has a higher concentration of solute (sucrose) which makes the solution hypertonic so the water will diffuse out of the egg. Control: Distilled Water (0.0 M solution) Constants: How long the eggs are...

Words: 613 - Pages: 3

Free Essay

Lakeside

...Download Now for Free PDF Ebook Lakeside Hospital Case Solution at our Online Ebook Library. Get Lakeside Hospital Case Solution PDF file for free from our online library LAKESIDE HOSPITAL CASE SOLUTION PDF Download: LAKESIDE HOSPITAL CASE SOLUTION PDF LAKESIDE HOSPITAL CASE SOLUTION PDF - Are you looking for Ebook lakeside hospital case solution PDF? You will be glad to know that right now lakeside hospital case solution PDF is available on our online library. With our online resources, you can find lakeside hospital case solution or just about any type of ebooks, for any type of product. Best of all, they are entirely free to find, use and download, so there is no cost or stress at all. lakeside hospital case solution PDF may not make exciting reading, but lakeside hospital case solution is packed with valuable instructions, information and warnings. We also have many ebooks and user guide is also related with lakeside hospital case solution PDF, include : Applied Calculus 4th Edition Even Answers, Basic Chemical Solutions, Catalytic Solutions Inc Case Study, Calculus Early Transcendentals 7th Edition Yonsei Solutions, Congress Scavenger Hunt Answers, College Algebra Textbook Answers 2, Congress Of Vienna Guided Answers, Chapter 18 Study Guide Answers, English Grammar Third Edition Answer Key, Fac1502 Oct Nov 2012 Solution Docx, Food Safety Test Questions And Answers, Hayden Mcneil Bio 101 Lab Manual Answers, Harcourt Trophies 5th Grade Answer Key, Holt Mathematics Lesson 9...

Words: 2722 - Pages: 11

Premium Essay

Chem 1 Lab

...Lab #1 Reaction Kinetics in Redox Reactions Procedure: Step 1: Prepare solution of sodium thiosulfate, place 0.25gm (250 mg) of Na2S2O3 in 100ml beaker, add 20 ml of water and mix until dissolved. Step 2: Prepare solution of potassium iodine. Add 10 gm of KI to a 100 ml beaker and add 20 ml of water and mix until dissolved. Step 3: Obtain a 600 ml beaker, add KI and Na2S2O3 solutions, then add 60ml of 1M HCl. Step 4: Finally add 50ml of .1M H2O2, as soon as the H2O2 is added start timing the reaction. Stop timing when the Iodine appears (solution changes color). Record time. Step 5: Varying [H2O2] while holding [I-] constant. (2 more runs) Repeat step 1 Repeat step 2 except with 20 gm and then 40 gm of KI Repeat step 3 Add extra 150 ml and then 450 ml of water to the 600 ml beaker Repeat step 4, record times for 300 ml and 600 ml solutions Step 6: Varying [I-] while holding [H2O2] constant. (3 runs) Repeat step1 Repeat step 2 Repeat step 3 First run add no extra water, second run add 100 ml , third run add 300 ml of water Repeat step 4, first run add 50 ml, second run 100 ml and third run add 200 ml of .1M H2O2 Record times for 150ml, 300 ml and 600 ml solutions Observation: Times (secs): run 1: 48 run 2: 48 run 3: 47 run 4: 48 run 5: 45 run 6: 44 rate = d[H2O2]/dt = (moles of H2O2 consumed) / (Total volume * Reaction Time) moles of H2O2 consumed = .5 * moles S2O3 2- moles S2O3 2- = .25...

Words: 319 - Pages: 2

Premium Essay

Orgo Techniques

...Separation of an Acid and Base: liquid-liquid/acid-base EXTRACTION Orgo Lab 1 Techniques: Technique 2 - Weight % Recovery p. 598 Weight percentage recovery = Weight of substance isolated Weight of original material X 100 Technique 8 - Filtration: is a technique used for two main purposes; 1. to remove solid impurities from liquid and 2. Collect desired solid from the solution form which it was precipitated or crystallized - Gravity Filtration → Decantation (separate liquid form large insoluble particles) Decantation: Large, heavy, insoluble particles, with careful pouring, you can decant the solution, leaving behind the solid particles that will precipitate (settle) to the bottom of the flask. “Decant” means to carefully pour out the liquid, leaving the insoluble particles behind - Vacuum Filtration →Hirsch Funnel, Buchner Funnel Vacuum filtration is used to collect solid products resulting form precipitation or crystallization. Used mostly when the volume of amliquid being foiltetred is more than 1-2mL Technique 12 – Extraction: Transferring a solute form one solvent into another (liquid-liquid extraction)  The solute is extracted form one solvent to the other because the solute is more soluble in the second solvent than the first.  Water can be used to extract or “wash” water-soluble impurities from an organic reaction mixture  Separatory Funnel: used in large scale reactions. To fill the separatory funnel, support it in an...

Words: 658 - Pages: 3

Premium Essay

Recrystallization Report

...is successfully performed.2,3 Recrystallization works based on the difference in solubility when the temperature changes. Therefore, picking the solvent to dissolve the compound is a very tricky and important part. For single-solvent recrystallization, which is performed in this experiment, the chosen solvent should not dissolve the sample while cold, so that the crystal can be formed when the temperature drops. However, the solvent should dissolve the sample completely while hot in order to release all the impurity crystals being trapped up in the solid form of the desired compound. Furthermore, the impurities should have higher solubility than the desired compound in that chosen solvent, so that all the impurities would remain in the solution while recrystallization takes place.2,3 In case no single solvent can be found, a system of two solvents can also be used for recrystallization. Generally speaking, in this solvent pair, one of them can completely dissolve the sample while the other one cannot dissolve the sample at all. The primary requirement when making this system is that the two chosen solvents have to be completely miscible, in other words, can mix with each other in all proportions. After this requirement is satisfied, all students need to do is to find out the right proportion for the system.1,2,3...

Words: 2513 - Pages: 11

Premium Essay

Adbfcr

...Experiment #6 Determination of the solubility product of PbI2 Introduction: The purpose of this lab is to get familiar with the concept of solubility by determining the concentration of PbI2 and Pb2+ in the slightly acidic solution and to calculate the solubility constant using the equation Ksp=[Pb2+][I-]2 . Safety: Safety glasses must be worn at all times. Gloves are recommended in order to avoid the direct contact between skin and the chemicals. Avoid the spill of chemicals during shaking the solution in the test tube. Must dispose liquids with lead in inorganic waste and filter paper in solid waste. The other liquids can be disposed in the drain with a lot of water. Procedure: Use the graduate cylinder next to the stock solution, obtain approximately 35ml of 0.012M Pb(NO3)2 in 0.20M KNO3 into a 250ml beaker. Use the graduate cylinder next to the stock solution, obtain approximately 30ml of 0.03M KI in 0.20M KNO3 into a 150ml beaker, and use the graduate cylinder next to the stock solution obtain 10ml 0.20M KNO3 into a 50ml beaker. Label four test tubes as 1,2,3 and 4. Pipet 5ml of 0.012M Pb(NO3)2 into each test tube, and pipet 2ml of 0.03m KI in KNO3 and 3ml of 0.2M KNO3 into test tube 1, pipet 3ml of the same solution and 2ml of 0.2M KNO3 into test tube 2, pipet 4ml of the same solution and 1ml of 0.2M KNO3 into test tube 3, and pipet 5ml of the same solution into test tube 4. Stopper each test tube using parafilm and shaker the test tube thoroughly for few minutes...

Words: 491 - Pages: 2

Free Essay

Solutions to Grooming Teens for Adulthood

...Solutions to Grooming Teens for Adulthood Reasoning and Problem Solving CST 1 November 30, 2009 To solve a problem one must often dive beneath the surface of the reflected obvious to reveal the rest of the issue hidden in the depths below. In Task one for this course the question of what is the best way to prepare teen’s for a successful adulthood has been addressed through several viewpoints and approaches. Just as there are multiple approaches in rearing children, there does not appear to be a single solution to the problem. Upon investigation it quickly becomes apparent that various groups can look at the same issue and will ultimately form different solutions that reflect their own skew on the problem. A closer look at example solution’s utilizing life skills through school settings, community resources, and Socratic home environments will demonstrate this concept. As an educator I believe that preparation is gleaned through understanding and understanding is gleaned from education. My solution would involve taking an active approach in educating the future educator by preparing the young to facilitate life skills for themselves and their own children one day. Equipping children with life applications of what they potentially will face as an adult is much like training a soldier for battle. Our county does not expect our military personnel to enlist and not receive training for what they will expect to encounter. Our children should not...

Words: 3075 - Pages: 13

Premium Essay

Synthesis of Acetanilide & Purification by Recrystallization

...Recrystallization Par, B., Ramos, S., Reynaldo, H., Roque, P., Servidad, Y., and Soriente, P. 2D-Pharmacy, Group No. 7, Department of Pharmacy, Faculty of Pharmacy, University of Santo Tomas, España Boulevard, 1015 Manila, Philippines Abstract Recrystallization is the primary method of purification used to isolate organic compounds in a supersaturated solution by the difference of solubility at different temperature that results to the separation of the compound from the solution. The purpose of this experiment is to synthesize acetanilide by the acetylation of aniline and to obtain pure acetanilide by purification of the collected crude acetanilide by crystallization. The recrystallizing solvent was chosen among ethanol, water and hexane. The acetanilide was synthesized and formed by acetylation of aniline and acetic anhydride, and it was then cooled to hasten the formation of crystals. After cooling, the mixture was filtered and dried to obtain the crude acetanilide. The crude acetanilide and the chosen recrystallizing solvent was mixed and heated in the water bath until the solid dissolved. The solution was filtered while hot and its filtrate was cooled in an ice bath. The filtrate was then filtered to collect the crystal residue formed. The crystals were washed with distilled water and allowed to dry to obtain the pure acetanilide. The weight of pure acetanilide was measured and the melting point of the pure acetanilide was determined. Based on the results obtained...

Words: 1798 - Pages: 8

Free Essay

Lab Report Design Example

...IB Chemistry Lab Report Design Example— Effect of Temperature on Solubility of Potassium Chloride in Water Research question How does temperature affect the solubility of potassium chloride in water? Hypothesis As the temperature of water increases, the particles of solid Potassium chloride, KCl, which are absorbing energy from its surrounding, start moving more easily between the solution and its solid state because. According to the second law of thermodynamics, the particles will shift to the more disordered, more highly dispersed solution state. I predict that as the temperature of a KCl and water mixture increases, then the solubility of the KCl will also increase. Variables Dependant variable The dependant variable will be the solubility of Potassium chloride in water that will be calculated at different temperatures. The solubility will change as temperature increases. Independent variable The control variables need to be constant in order to get valid and accurate results. The temperature of the solutions. Controlled variables The volume of distilled water used to dissolve Potassium chloride in each beaker The amount of Potassium chloride deposited into each beaker. The volume of the solution extracted by the syringe. Weight of each 50ml beaker Materials 6 Syringes 1 Heating plate 6 distinctly labeled 50ml Beakers 1 Electric Balance 6 Stirring Rods Distilled Water 6 distinctly labeled 100ml Beaker Controlling...

Words: 883 - Pages: 4

Premium Essay

Potato Osmosis Lab

...all the solutions and collecting data, the solution most similar to the test solution in concentration is Solution A. According to my data, Solution B, C, and D all lost mass (grams) while Solution A’s mass increased. Informed by this data, the mass change should be positive in order to match the test solution. Due to the exposure of the hypotonic solution in Solution A, the potato increased from 2.71 ± 0.01 grams to 3.01 ± 0.01 grams. Through osmosis, the water molecules moves from the solution into the potato cells’ semi-permeable membrane which exists across the concentration gradient in order to reach an isotonic state. This lead to the potato increasing in relative weight and size to its prior form. With my data’s evidence,...

Words: 570 - Pages: 3

Free Essay

Lab Report

...Dilutions of Concentrated Solutions Purpose: To make dilutions of concentrated solutions and report their concentration in different ways. Hypothesis: I predict that at least one of the tubes will not change color because of the little concentration it has. Materials: Balance, analytical Balance, tabletop milligram weigh paper, 7.6x7.6 cm weigh boat, 3.5”x3.5” Lab scoops cupric sulfate 5-hydrate Tubes, 15 mL, capped Tube racks for 15mL tubes Deionized water Permanent lab marker pens Tubes, glass, 13x100mm Peg racks for 13x100 mm tubes pipets, 5mL pipet pump, green Spectrophotometer, spectronic 20 D+ Procedure: ● In matrixes similar to those shown in table 3.21 and 3.22, record all your calculations and diagrams. Confirm your calculations with another person’s calculations before you begin. Draw a diagram to show how each sample is diluted. Use the equation to make the calculations. Be sure to make the columns te appropriate width for the material they will contain. ● Label all tubes with the name and concentration of the sample, your initials, and the date. Table 3.21 Dilutions of the 300x stock CuSO4 volume to be made (mL) concentration to be made (x) 5 150x 7 30x 5 15x 5 3x 4 Calculations Volume of stock to use Solution preparation diagram 1x 1. Prepare 25mL of 300-mg/mL CuSO4 solution. Mix well. Do not use previously made solutions. consider this a 300x stock solution. A. Show the calculations...

Words: 706 - Pages: 3

Premium Essay

Osmosis And Diffusion Lab Report

...Sonora Schueneman Dr. Kemp- Hailee Nerber Bio 111- 551 19 September 2017 Osmosis and Diffusion Across a Plasma Membrane-Lab 2 ​ ​Week two in the lab consisted observing a constructed experiment involving osmosis and diffusion across a semi-permeable membrane. This allowed myself to formulate a hypothesis stating, the four pipets of cooked starch and amylase will diffuse through their dialysis bag into the beaker containing 2/3 water and four pipets of Lugol’s solution. Thus being stated, the null hypothesis would be, the four pipets of cooked starch and amylase will not diffuse through their dialysis bag into the beaker containing 2/3 water and four pipets of Lugol’s solution. ​In order to test our hypothesis, I set up a control beaker (Beaker...

Words: 476 - Pages: 2