Preview

Lab 8 Student

Good Essays
Open Document
Open Document
2441 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Lab 8 Student
1. Lab 8: Input Validation
This lab accompanies Chapter 7 of Starting Out with Programming Logic & Design.

Name: Devin Hill, Matt March, and John Meno

Lab 8.1 – Input Validation

The goal of this lab is to identify potential errors with algorithms and programs.

Step 1: Imagine a program that calls for the user to enter a password of at least 8 alphanumeric characters. Identify at least two potential input errors.
-Password contains a symbol
-Password has less than 8 charecters

Step 2: Imagine a program that calls for the user to enter patients’ blood pressure. Blood pressure ranges are between 50 and 230. Identify at least two potential input errors.
-Blood pressure isn’t a number
-Blood pressure is below 50, or above 230

Step 3: Open either your Lab 5-3.rap flowchart or your Lab 5-4.py Python code. This program allowed the user to enter in 7 days worth of bottle returns and then calculated the average. Examine the program and identify at least two potential input errors.
-Input not a number
-Input is negative

Step 4: Open either your Lab 6-4.rap flowchart or your Lab 6-4.py Python code. This program allowed a teacher to enter any number of test scores and then calculated the average score. Examine the program and identify at least two potential input errors.
-Input is not a number
-Input is negative
Lab 8.2 – Input Validation and Pseudocode

The goal of this lab is to write input validation pseudocode.

Step 1: Examine the following main module from Lab 5.2. Notice that if the user enters a capital ‘Y’ the program will end since the while loop only checks for a lower case ‘y’.

Module main () //Step 1: Declare variables below Declare Integer totalBottles = 0 Declare Integer counter = 1 Declare Integer todayBottles = 0 Declare Real totalPayout Declare String keepGoing = ‘y’ //Step 3: Loop to run program again While keepGoing == ‘y’ //Step 2: Call functions getBottles(totalBottles, todayBottles, counter)

You May Also Find These Documents Helpful

  • Satisfactory Essays

    = z) return true; else return false; } Problem 5 a. Output: 720 b. Output: 0 c. Output: 71 d. Output: 362880 Problem 6 a. Output: “Take Programming I.” b. Output:…

    • 188 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Unit 7 Lab And Assignment

    • 311 Words
    • 2 Pages

    Complementary Metal Oxide Semiconductor, or CMOS, is a widely used type of semiconductor. CMOS semiconductors use both NMOS(negative polarity) and PMOS(positive polarity) circuits. Since only one of the circuit types is on at any given time, CMOS chips require less power than chips using just one type of transistor. This feature makes them convenient for use in battery-powered devices such as laptops. Personal computers also contain a small amount of battery-powered CMOS memory to hold the date, time, and the system setup parameters. To access the CMOS on most computers, press the delete key as the computer is booting.…

    • 311 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    This student’s assignment prompts the user to enter a word. I see the prompt output on the screen at the beginning of the program.…

    • 204 Words
    • 1 Page
    Satisfactory Essays
  • Powerful Essays

    Pre Lab Experiemnt 8

    • 754 Words
    • 3 Pages

    (2.43 g Zn x 1 mol Zn) / 63.38 g Zn = 0.037 mol Zn…

    • 754 Words
    • 3 Pages
    Powerful Essays
  • Satisfactory Essays

    Lab 204 Quiz

    • 2478 Words
    • 10 Pages

    You follow certain step’s to access the supplementary readings for a course when u sing your organizations library management system. These steps that you follow are examples of the _________ components of an information system.…

    • 2478 Words
    • 10 Pages
    Satisfactory Essays
  • Good Essays

    Lab #3

    • 517 Words
    • 3 Pages

    The two types of encryption supported by GPG are MD5 and Sha1 which serve as hashing encryptions.…

    • 517 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    It 210 Week 7

    • 286 Words
    • 2 Pages

    2. Display the contents of the file GRADES created in Problem 1. Each student’s record should appear on a separate line and include the total score (the sum of the three tests) for that student. For example, a line of output might be as follows:…

    • 286 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    chemistry lab

    • 3757 Words
    • 34 Pages

    Regents Chemistry Quarter 1 Midterm Review 1. The percent by mass of oxygen in Na2SO4 (formula mass = 142) is closest to 1) 11% 3) 45% 2) 22% 4) 64% 2. Given the unbalanced equation: __Al(s) + __O2(g) → __Al2O3(s) 3. 4.…

    • 3757 Words
    • 34 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Document Pt1420

    • 1390 Words
    • 6 Pages

    * LO35: Write input validation loops and validation functions to check accuracy of input data.…

    • 1390 Words
    • 6 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Step 5: If you find a great deal of variability, you can put more sample counts into the average.…

    • 300 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Sas If Then Else

    • 1347 Words
    • 6 Pages

    Using IF THEN ELSE statements, LENGTH is to be use so that the new coloum create (Patient) will have defined length that is $12.…

    • 1347 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Acc564 Week 5 Homewrk

    • 2054 Words
    • 9 Pages

    b. For each of the five data fields, suggest one or more input edit controls that could be used to detect input errors.…

    • 2054 Words
    • 9 Pages
    Good Essays
  • Good Essays

    • • • • • • String Fundamentals Library Functions Input Data Validation Formatting Strings (Optional) Case Study: Character and Word Counting Common Programming and Compiler Errors…

    • 1527 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Discrete math

    • 390 Words
    • 2 Pages

    (c) The program will terminate if and only if the input is not numeric or the escape key is pressed.…

    • 390 Words
    • 2 Pages
    Good Essays
  • Good Essays

    (e) Name the type of error (syntax, runtime or logical error) in each case given below: [2]…

    • 1978 Words
    • 8 Pages
    Good Essays