Preview

PT1420 Assign1 UNit6

Satisfactory Essays
Open Document
Open Document
540 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
PT1420 Assign1 UNit6
Edward
Martin
PT1420
Practice Activity 2:Assignment 1: Homework
Algorithm Workbench Review Questions 6-10, Starting on page 159
6. Rewrite the following If- Then- Else If statement as a Select Case statement. If selection == 1 Then Display " You selected A." Else If selection == 2 Then Display " You selected 2." Else If selection == 3 Then Display " You selected 3." Else If selection == 4 Then Display " You selected 4." Else Display " Not good with numbers, eh?" End If
Dim Selection as Integer 1
Select Case Selection
Case 1 display "you selected A"
Case 2 display "you selected 2"
Case 3 display "you selected 3"
Case 4 display "you selected 4"
Case Else display " Not good with numbers, eh?”
End Select
7. Design an If- Then- Else statement ( or a flowchart with a dual alternative deci-sion structure) that displays “ Speed is normal” if the speed variable is within the range of 24 to 56. If speed holds a value outside this range, display “ Speed is abnormal.”
Main
Declare Integer Speed Display “Enter Speed;” If speed>=24 AND speed <= 56 Then
Else
Display “Speed is normal”
Else
Display “Speed is abnormal”
END If
End
8. Design an If- Then- Else statement ( or a flowchart with a dual alternative decision structure) that determines whether the points variable is outside the range of 9 to 51. If the variable holds a value outside this range it should display “ Invalid points.” Otherwise, it should display “ Valid points.”

9. Design a case structure that tests the month variable and does the following: . If the month variable is set to 1, it displays “ January has 31 days.” . If the month variable is set to 2, it displays “ February has 28 days.” . If the month variable is set to 3, it displays “ March has 31 days.” . If the month variable is set to anything else, it displays “ Invalid selection.”

10. Write an If- Then statement that sets the variable hours to 10 when the flag variable minimum is set.

Programming Exercises 5 and 8, Starting on page 160
5.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    a1 script win213

    • 380 Words
    • 2 Pages

    If the user does not enter a numeric value the program should prompt for a numeric value…

    • 380 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Is4796 Unit 1 Assignment

    • 370 Words
    • 2 Pages

    My company; RLR Securities Inc., has been in the security service since 2002 we started out with only four (4) people, now we have grown to twenty-two (22) people, RLR Securities Inc. was formed as a small corporation who’s focus was mainly on database performance tuning and security services for database applications. By 2006 we started providing complete security services, including assessments, penetration testing, policy creation, and regulatory compliance assistance.…

    • 370 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Unit 4

    • 4123 Words
    • 17 Pages

    A minimization problem with four decision variables, two greater-than-or-equal-to constraints, and one equality constraint will have…

    • 4123 Words
    • 17 Pages
    Satisfactory Essays
  • Satisfactory Essays

    PT1420 Unit 8 Lab 8

    • 365 Words
    • 2 Pages

    loop, page 186): List hours starting with Hour 1 up to Hour 24, as declared “Max Hours”…

    • 365 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The latest version of CSS is the CSS3 version which basically differs from CSS2 in the incorporation of Modules and other changes. Modules enable the designing to be done in a lesser time with more ease while updating individual features and specifications. The CSS3 version supports many more browsers than CSS2, but make sure it works on all operating systems and browsers.…

    • 272 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Pt1420 Unit 9

    • 615 Words
    • 3 Pages

    1. The composition of dry air at sea level is nearly the same everywhere on Earth’s surface and up to an altitude of about 80 km.…

    • 615 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Nt1310 Unit 1 Assignment

    • 2784 Words
    • 12 Pages

    • In 1970, Corning used pure silica to create a fiber with a loss of…

    • 2784 Words
    • 12 Pages
    Powerful Essays
  • Satisfactory Essays

    Comp230 Wk 5 Lab

    • 411 Words
    • 2 Pages

    Copy your Mod1_PCTests.vbs program from NotePad++ and paste it into the space provided below. Any portion of the script that will not fit should be continued in the textbox on the next page.…

    • 411 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Program Lovecs.Java

    • 422 Words
    • 2 Pages

    import java.util. Scanner; public class LoveCS { public static void main(String[] args) { Scanner scan=new Scanner(System.in); System.out.println("Enter how many times you wish the message to be printed."); int limit = 0; limit= scan.nextInt(); int sum=0; int count=1; while (count <=limit) { System.out.println(count+" I love Computer Science!!"); sum+=count; count++; } System.out.println("Printed this message " + limit + " times."); System.out.println("The sum of the numbers from 1 to "+limit+" is "+sum); } } import java.util. Scanner; public class PowersOf2 { public static void main(String[]args) { int valuePowersOf2; int nextPowersOf2 =1; int exponent= 0; int count=0; Scanner scan = new Scanner(System.in); System.out.println("Enter A Number.");…

    • 422 Words
    • 2 Pages
    Better Essays
  • Good Essays

    Pt1420 Unit 6 Assignment

    • 606 Words
    • 3 Pages

    When the activity was first assigned each member of the group was assigned a different part of the assignment. For, my part in the assignment I was assigned to complete the evaluation tool. The other three members were assigned one of the other three parts left in the activity. When, it came to deciding the activity we each came up with an idea, but then we eventually decided that we would do softball. After that, during the process there were group meetings held to figure the best way for the activity to be run, and how each member was doing with their part of the assignment. I was a little confused with the fact that I wasn’t assigned more work to do. In my opinion, I felt that I could’ve done more than just the evaluation tool I wanted to contribute more to the group. Beyond that, it confused me that during the activity, it took us a while to decide to let each batter have a runner with and…

    • 606 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Pt1420 Unit 6

    • 222 Words
    • 1 Page

    1. The society will consist of an agricultural branch, which will be responsible for gathering/growing food for the people. There will be a construction branch, which will be responsible for building houses, public buildings and other structure and repairing them if needed.…

    • 222 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    6. Press STAT which option will sort data in ascending order? What do you think will happen if option 3 is selected? __________________________________…

    • 641 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    python cheat sheet v1

    • 513 Words
    • 13 Pages

    sys Variables String Methods Datetime Methods capitalize() * lstrip() today() fromordinal(ordinal) builtin_module_names Linked C modules center(width) partition(sep) now(timezoneinfo) combine(date, time) byteorder Native byte order count(sub, start, end) replace(old, new) utcnow() strptime(date, format) check_interval Signal check frequency decode() rfind(sub, start ,end) fromtimestamp(timestamp) utcfromtimestamp(timestamp)…

    • 513 Words
    • 13 Pages
    Satisfactory Essays
  • Good Essays

    POW Free Think Football

    • 531 Words
    • 3 Pages

    Process: The first thing that I did is list the numbers 1-50 on a sheet of paper. I started at 1 and crossed off each number that were possible and circled the numbers that weren’t possible. It is impossible to get 1, 2, 4, and 7. It is possible to get 3, 5, and 8-50. So then I listed the number 51-100. I used the same method as I did before. It was possible to get every number from 51-100. Then I created a table to have all of the information together that shows how each number can be possible.…

    • 531 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    for (int p = 0; p < x; p++) { a[p] = input.charAt(p); // in these couple lines here.…

    • 277 Words
    • 2 Pages
    Satisfactory Essays

Related Topics