Preview

PT1420 U8 Homework

Satisfactory Essays
Open Document
Open Document
431 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
PT1420 U8 Homework
Unit 8 Homework
Short Answer:
6. a loop that never hits a max value or that never turns true is infinite
While (number >=0) Console.ReadLine(“Enter a positive number”) number = Console.ReadLine()
End While
7. A count-controlled loop
8. You need to initialize so you don’t fall into an infinite loop.
9. You can let user control the number of times it executes
10.
Algorithm Workbench:
#3:
For counter = 0 Step 1000 Console.WriteLine(“Value ” & counter) counter = counter + 10
#4:
Dim sum as integer = 0
Dim number as integer = 0
Dim counter as integer = 0
While counter < 10 Console.writeline(“enter a number”) Number = Console.Readline() Sum = sum + number Counter = counter + 1
End While
#9:
Dim count as integer = 0
For count = 0 Step 50 Console.writeline(“the count is ” & count) count = count + 1
End For
#10:
Dim count as integer = 1
While count < 50 Console.writeline(“The count is ” & count) count = count + 1
End While
Programming Exercises:
#7:
Module Module1

Sub Main() 'declare variables Dim year As Integer = 1 Dim numYears As Integer = 0 Dim month As Integer = 1 Dim rainfall As Double = 0.0 Dim totalRain As Double = 0.0 Dim totalMonths As Integer = 0 Dim avg As Double = 0.0

Console.WriteLine("Enter number of years for rainfall average") numYears = Console.ReadLine() While year <= numYears While month <= 12 Console.WriteLine("For year " & year & " and month " & month & " enter rainfall amount in inches") rainfall = Console.ReadLine() totalRain = totalRain + rainfall month = month + 1 End While month = 1 year = year + 1 End While totalMonths = numYears * 12 avg = totalRain / totalMonths

Console.WriteLine("The total number of months is " & totalMonths) Console.WriteLine("The total rainfall is " & totalRain & "

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Samuel Aggor CSC 1100 3/3/16 Assignment 5 Problem 1 a. Output: 3.94 b. Output: 6.67 c. Output: 15.00 d. Output: -35.00 e. Output: 0 Problem 2 a. Output: 62 b. Output: 20160 c. Output: 20 213837312 d. Output: 1 Problem 3 a. Func1 has two parameters. Func1 is an integer function. b. Func2 has three parameters. Func2 is a double function.…

    • 188 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Indeed, Santa Claus is coming to town. Only this time, he's a "Secret Santa" in the form of a casino online video slot game provided by Microgaming. It's hard to imagine there would be slot players who won't enjoy playing the Secret Santa slot, even if it's only during the holiday season. Since the jackpots and excitement exist year-round, it makes perfect sense this game should be considered a keeper 365 games a year.…

    • 605 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    The free group with two generators a and b is composed of all finite strings that are formed from the four symbols a, a−1, b and b−1 given that no a is directly next to an a−1 and no b is directly next to a b−1. Two such strings can be concatenated and converted into a string of this type by repeatedly replacing the "forbidden" substrings with the empty string. For example: abab−1a−1 concatenated with abab−1a yields abab−1a−1abab−1a, which contains the substring a−1a underlined in the example, and so the “forbidden” string gets cancelled and reduced to abab−1bab−1a, which again contains the substring b−1b underlined in the example, which then gets reduced to abaab−1a. It can be checked that the group formed from the set of those strings with…

    • 493 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    No the supervisor isn't right because Mark and Jean can fill the pool less than ten hours.…

    • 104 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    2.What number does a bit that is turned on represent? What number does a bit that is turned off represent? On is 1 and Off is 2…

    • 286 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    For Visual Basic a variable’s name must have a letter as the first character, you cannot use spaces, periods, or other special characters such as !@#. The name cannot exceed 255 characters. The variable should not have a similar name as the functions, statements, and methods, and the name cannot be repeated within the scope. This language is not case sensitive.…

    • 333 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Unit 6 Programming

    • 420 Words
    • 5 Pages

    print (” These are not primary colors . I can ’ t mix them !”)…

    • 420 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    1. Explain in words why the equation {n \choose k} = {n \choose n -k} is true.…

    • 527 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Pt1420 Unit 3 Assignment

    • 2806 Words
    • 12 Pages

    Essential Standards Portfolio Assignment The Essential Standards and Mathematical Terms you will be using in this Unit are in blue text below. Essential Standards Mathematical Terms Graphing a Polynomial Function, Finding Zeroes/Solutions to a Polynomial Polynomial Functions Function Center and Vertices, Foci, Major and Minor Axes, Standard Equation for an Conic Sections - Ellipse Ellipse Center and Vertices, Foci, Transverse and Conic Sections Conjugate Axes, Asymptotes, Standard Hyperbola Equation for a Hyperbola Solving a Rational Expression Using Exponents, Solving a Rational Expression Rational Functions from a Graph Binomial Theorem Expansion Binomial Theorem Combinations and Combinations, Permutation Permutations Points 3 The…

    • 2806 Words
    • 12 Pages
    Good Essays
  • Powerful Essays

    Pt1420 Unit 3 Assignment

    • 3509 Words
    • 15 Pages

    As a developer I was involved in collecting the requirements from business end user, according understood the business needs and involved in designing the universe for sales department ,As a first step we understand the structure of the universe and depending upon the fact tables n dimension tables created classes ,objects ,defined joins ,cardinalities ,created derived tables, custom Hierarchies .…

    • 3509 Words
    • 15 Pages
    Powerful Essays
  • Satisfactory Essays

    Pt1420 Unit 1 Assignment

    • 303 Words
    • 2 Pages

    These administrations help in building common dialect UIs. Discourse to Text gives a transcript of common dialect into content. Artificial intelligence is utilized to join linguistic and dialect structures with the preparing of voice motion for a more exact recognizable proof of words. Then again, Text to Speech benefit incorporates discourse from a content document while altering cadence and sound. The words are integrated progressively in a few dialects.…

    • 303 Words
    • 2 Pages
    Satisfactory 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
  • Good Essays

    Pt1420 Unit 3 Essay

    • 966 Words
    • 4 Pages

    I got the idea because my cousin and I were playing a game where you had to multitask. So that’s how I came up with the idea. I thought that the kids would be the best at multitasking because since all the kids are still in school they might know more. I conducted the experiment by first gathering my subjects and my materials. Then I explained to all of my subject what they were going to do, I started the experiment and wrote everything they did during the test. Finally wrote all the data on the data table. The result was adults were the best at…

    • 966 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Pt1420 Unit 7 Analysis

    • 737 Words
    • 3 Pages

    Each of these components is programmed in a specific language, for example, Perl, java. PHP, Python, Ruby, or Erlang. Almost every language supports web programming, Different syntax, and same semantics. Consequently, severer side developers have a tendency to solve every problem in her/his desired…

    • 737 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Quiz For Online Class

    • 387 Words
    • 2 Pages

    Question 7.7. Which of the following is an example of a terminal value? (Points : 2)…

    • 387 Words
    • 2 Pages
    Satisfactory Essays

Related Topics