Pt1420 Programming

In: Computers and Technology

Submitted By davinlpn79
Words 493
Pages 2
PT1420 - Unit 3 Homework and Lab Assignment

Unit 3 Assignment 1: Homework

1.) A dietician wants you to write a program that will calculate the number of calories a person can lose by walking at a slow pace for a mile; however, the user will have only the distance given by a pedometer, which is measured in steps and not miles. Assume each mile a person walks is equivalent to 2000 steps, and that for every mile walked, a person loses 65 calories. Allow the user of the program to enter the number of steps taken throughout the day. The program will calculate the distance in miles and the number of calories lost. The user of the program should also be able to enter the day of the week the data is being calculated for. The day of the week, the distance in miles, and the calories lost should then be displayed to the screen.

Using the Input, Process, Output program cycle, list the elements to be included in each step of the cycle, based on the program requirements above.

Paste your answers here
Miles walked
Day of the week
Process # of steps/2000
Process answer above *65 calories
Output day of the week, miles walked and calories lost

2.) Design a program that converts Celsius temperatures to Fahrenheit temperatures. You can approach this using either pseudocode or a flowchart, or both.

Paste your design here.


Unit 3 Labs


Write a program that will take in basic information from a student, including their name, their degree program, credits required to complete the degree program, and how many credits they have taken thus far. The program will calculate how many credits are still needed to graduate. Displayed outputs should include the student name, degree program, number of credits taken, and number of credits still needed to graduate.

1.) Lab…...

Similar Documents

Pt1420 Research Paper 1 Programming Languages

...Between the 1970's and the 2000's there are so many programming languages, it seems nigh impossible to list all of them. But, of course, there's always the most important or the most popular, and a lot of times the most important/most popular are the same languages, just maybe in a different order. The 1970's seen a quick advancement in computers and their languages due the the creation of the microprocessors. This era's programming history is marked by C, Pascal, Smalltalk, Scheme and Prolog The C programming language is the basis for many others. It's one of the singly most important building blocks of many of the languages used today. C was created in 1971, though it's roots go back to 1954's Fortran. However, it's direct predeccessor was B in 1969. C was created as a compiler to more easily install OS's on computers. It made it possible to the few system-dependent requirements and then use a C compiler to install the new OS. Bell Lab's Ken Thompson was behind the original B, then him and Dennis Ritchie, also of Bell Labs, improved upon it for the NB language. The evolution of NB led naturally to C. Pascal is another language that is the basis of many others, and many of the languages used commonly now have it somewhere in their developmental line. Pascal was named for Frenchman Blaise Pascal, a pioneer mathematician, that had created the first arithmetic machine. That machine could, arguably, be considered the first computer. Niklaus Wirth had written the first......

Words: 1483 - Pages: 6

Pt1420 Programming Unit 1 Research Assignment

...1970’s CLU is a programming language created at MIT by Barbara Liskov and her students between 1974 and 1975. It was notable for its use of constructors for abstract data types that included the code that operated on them, a key step in the direction of object-oriented programming (OOP). Euclid is an imperative programming language for writing verifiable programs. It was designed by Butler Lampson and associates at the Xerox PARC lab in the mid-1970s. The implementation was led by Ric Holt at the University of Toronto and James Cordy was the principal programmer for the first implementation of the compiler. It was originally designed for the Motorola 6809 microprocessor. Forth is an imperative stack-based computer programming language and programming environment. Language features include structured programming, reflection (the ability to modify the program structure during program execution), concatenative programming (functions are composed with juxtaposition) and extensibility (the programmer can create new commands). Although not an acronym, the language's name is sometimes spelled with all capital letters as FORTH, following the customary usage during its earlier years. Forth was designed by Charles H. Moore and appeared in the 1970’s. GRASS is the original version of GRASS was developed by Tom DeFanti for his 1974 Ohio State University Ph.D. thesis. It was developed on a PDP-11/45 driving a Vector General 3DR display, and as the name implies, this was a purely......

Words: 1885 - Pages: 8


...Using Global Variables Global Variables Global variables are used in applications in programming. There are advantages and disadvantages to using these variables. Using global variables has its advantages in some forms of applications, while using them in others would make using them more difficult. Global variables are useful when you need to share a function with all functions in an application. Global variables can be easier to identify in an application by giving them a unique name, so that other programmers can see they are working with a global variable when maintaining your application. On small programs such as widgets or gadgets it may be easier to use global rather than passing around local variables. Using a global variable means that other functions cannot update it. Another advantage to global is that they can be accessed from anywhere in the program. Some are also disadvantages to using global variables. Global variables can create mutual dependencies, with an increase in dependencies the complexity of the code increases. Any function can access a global variable in the program so a change in the program at one point can change values everywhere. Global variable also slow down performance speed a little. Using global variables makes reusing parts of the script impossible. Global variables also make tracking a bug much harder. When declaring a global variable in a flowchart, you would but the variable in the main part of the program, hence the box......

Words: 261 - Pages: 2

Pt1420 Introduction to Programming Lab03

...Variable Name | Problem(Yes or No) | If Yes, What is wrong? | Declare Real creditsTaken | NO | | Declare Int creditsLeft | YES | INT can only hold whole numbers, cant account for half credits. | Declare Real studentName | Yes | Needs to be string not Real. Real is for numbers | Constant Real creditsNeeded = 90 | No | | Step 1 Step 2 What is wrong with the following calculation? Set creditsLeft = creditsTaken – creditsNeeded The calculation is backwards, if left as is it would read a negative number. It should be Set creditLeft = creditsNeeded – creditsTaken. Step 3 Display “The student’s name is”, studentName The student’s name is Nolan Owens Step 4 Display “The Network Systems Administration degree is awarded after 90 credits and”, studentName, “has”, creditsLeft, “left to take before graduation.” The Network System Administration degree is awarded after 90 credits and Nolan Owens has 70 left to take before graduation. Step 5 1. //Provide documentation on line 2 of what this program does 2. //This program shows how many credits a student needs to graduate from Network System Administration. 3. //Declare variables on line 4, 5, 6, and 7 4. Declare Real creditsTaken 5. Declare Real creditsLeft 6. Declare String studentName 7. Declare Constant Integer creditsNeeded = 90 8. //Ask for user input of studentName and creditsTaken on line 9-12 9. Display “What is the student’s name?” 10. Input studentName 11....

Words: 275 - Pages: 2


...ALONZO DARGAN (17186943) PT1420 Computer Programming Unit 7 Assignment 1: Homework 7 May 2014 Short Answers Page 213 1-5 1. Why should you indent the statements in the body of a loop? Because by indenting the statements in the body of the loop you visually set them apart from the surrounding code. This makes your program easier to read and debug. 2. Describe the difference between pretest loops and posttest loops. A pretest loop means to test its condition before performing an iteration A posttest loop means it performs an iteration before testing its condition. 3. What is a condition-controlled loop? A condition-controlled loop uses a true/false condition to control the number of times that it repeats. 4. What is a count-controlled loop? A count-controlled loop repeats a specific number of times. 5. What three actions do count-controlled loops typically perform using the counter variable? 1) Initialization: the variable is initialized 2) Test: the loop tests the variable by comparing it to the maximum value 3) Increment: to increase the value during each iteration the loop increments the counter variable by adding 1 to it. Algorithm Workbench Review Questions 1,2,7, and 8 p. 213-214 1. Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as the product contains a value less than 100. A- Declare number as integer ...

Words: 721 - Pages: 3


...PT1420 unit 1 homework 1. Software mainly directs and coordinates computer hardware. In its function, software directly provides instructions to the computer hardware and serves as input to another piece of software to facilitate computing. 2. Some basic computer hardware includes the motherboard, CPU, RAM, hard drive. 3. A computer stores data in clusters on the hard drive. Each cluster is a pie slice-looking area that holds a certain amount of data. The amount of data that can be stored in each cluster is dependent on the operating system. 4. A program tells the computer how to accept some type of input, manipulate that input, and spit it back out again in some form that humans find useful. 5. Machine Language is what essentially people normally call binary. Assembly Language is the next step up, using specific keywords and terms, and will require an assembler to convert into executable machine language. A high-level language is what most programmers’ use, because of its reconizability since it may contain some English terms that we humans can understand. To convert a high-level language to machine language, you'll need a compiler and linker. 6. A compiler takes all of the code and translates it into something a computer can understand. This compiled code is then executed or saved to a file to be executed at a later time. Interpreter takes code and translates it line by line and doesn't save the translated code in a file. 7. System......

Words: 418 - Pages: 2


...PT1420 7/12/14 Short answer: 5. What two things must you normally specify in a variable declaration? a. Variable type b. Identifier 6. What value is stored in uninitialized variables? Some languages assign a default value as 0 to uninitialized variables. In many languages, uninitialized variables hold unknown values. Algorithm Workbench: 3. Write assignment statements that perform the following operations with the variables a, b, and c. a. Adds 2 to a and stores the result in b. b. Multiplies b times 4 and stores the result in a c. Divides a by 3.14 and stores the result in b d. Subtracts 8 from b and stores the result in a a. Adds 2 to a and stores the result in b. Set b = 2 + a b. Multiplies b times 4 and stores the result in a set a. Set a = b * 4 c. Divides a by 3.14 and stores the result in b. Set b = 3.14 / b d. Subtracts 8 from b and stored the result in a. Set a = b - 8 4. Assume the variables result, w, x, y and z are all integers, and that w = 5, x = 4, y = 8, and z = 2. What value will be stored in result in each of the following statements? a. Set result = x + y (4 + 8) = 12 b. Set result = z * 2 (2 * 2) = 4 c. Set result = y / x (8 / 4) = 2 d. Set result = y – z (8 – 2) = 6 5. Write a pseudocode statement that declares the variable cost so it can hold real numbers. Dim cost1 As Double = 0 6. Write a pseudocode statement that declares the variable total so it can......

Words: 764 - Pages: 4


...PT1420 - Midterm Study Guide Study online at 1. ...: How many times will this loop iterate Set = 1 While i 5 Display i end while 22. List three examples of application software: Microsoft Word Adobe Photoshop Microsoft Visual Studio 6. ...: How many times will this loop iterate Set = 1 While i Great Then < Less Then >= Greater Then or Equal 7 is false 5 < 7 Is True (5 > 7) or (10 > 3) is True (5 > 7) and (10 < 3) is False NOT (5 > 7 ) and (10 > 3 )is true because the NOT reverses the False Age < 10 and age > 60 Will never be true 55. What is the term that describes the part of the program that a variable can be accessed?: Scope What is the truth table for AND?: True AND True = True True AND False = False False AND False = False False AND True = False 34. 35. 56. 36. 57. What is the truth table for OR?: True OR True = True True OR False = True False OR False = False False OR True = True 58. 59. 60. What is the value of 2^3?: 2 2 2 = 8 What is the value of 4^2?: 4 * 4 = 16 What is the value of the expression 10-4*3/2+5?: 9. Multiply first, then divide, then subtract and finally add. What is used to check the relationship between two values?: Relational Operator What is used to translate high level language programs to machine language (or machine code)?: Compiler What makes a computer useful for everyday tasks?: Application Software What was the first programming language designed to perform complex math functions?:...

Words: 779 - Pages: 4

Pt1420 Homework

...PT1420 Melson, Brain Unit 4 Assignment 1: Homework Learning Objectives and Outcomes * Explain the importance of separating code into modules for efficiency. * Use flowcharts and pseudocode to represent program modules. * Describe the impact of program modules on variables—variable scope. * Describe the necessity of having compatible arguments in module parameters. * Evaluate the various program modules. Assignment Requirements Do the following problems: * Short Answer 1-7 on page 111 1. How do modules help you to reuse code in a program? a. Help reduce the duplication of code within a program, this benefit of using modules is known as code reuse because you are writing the code to perform a task once and then reuse it each time you need to perform a task. 2. Name and describe the two parts that a module definition has in most languages. a. A header and a body. The header indicates the starting point of the module, and the body is a list of statements that belong to the module. 3. When a module is executing, what happens when the end of the module is reached? a. When a module is called, the computer jumps to that module and executes the statement in the module's body. Then, when the end of the module is reached, the computer jumps back to the part of the program that called the module, and the program resumes execution at that point. 4. What is a local variable? What statements are able to access a local variable? ...

Words: 1156 - Pages: 5

Programming Final Pt1420

...1. What is the term used for the memory address of the location of the statement immediately after the module called? Return Point 2. What tool would a programmer use to visualize the relationship between modules? Hierarchy charts 3. What is the term used for the variable that received an argument that passed into a module? Parameter 4. What is the term used that means only a copy of the argument’s value is passed into the parameter? “passing an argument by Value” 5. What’s the name of the variable that’s visible to every module and the entire program? Global 6. What is the term used that means the argument is passed into a parameter that will reference the content of the argument in the module. “passing an argument by Reference” 7. What’s the name of the structure that is a logical design that controls the order in which a set of statements executes? Control structure 8. Which symbol indicates that some condition must be tested in a flowchart? Diamond 9. What type of operator can be used to determine whether a specific relationship exists between two values? Relational 10. What operator (or symbols) are used to determine that the operands are NOT exactly the same value? != 11. What is the symbol in a flowchart that denotes a terminal point? Oval 12. Which flowchart symbol denotes a process? Rectangle 13. What is the term that represents “a storage location in memory”? Variable 14. List the variable naming rules: cannot...

Words: 500 - Pages: 2


...installed: ") feetUTP = Console.ReadLine() End Sub Sub calcCosts(ByVal feetUTP As Double, ByRef subTotal As Double, ByRef taxCost As Double, ByRef totalCost As Double) subTotal = feetUTP * 0.21 taxCost = subTotal * 6% totalCost = subTotal + taxCost End Sub Sub finalBill(ByVal clientName As String, ByVal totalCost As Double) Console.WriteLine("The client name " & clientName) Console.WriteLine("Final cost is " & totalCost) Console.ReadLine() End Sub End Module Lab 4.4 – Challenge: Ping and Website Launches This lab requires you to write a Visual Basic program that includes modules to do the following tasks important in the field of networking and programming: What is ping.exe? Ping.exe is a simple network utility to test whether or not a device such as a router, server or switch is contactable. When the device receives this information it then sends a reply saying “yes, I am here”. Ping is used a lot in IT and network troubleshooting. What is System.Diagnostics.Process.Start( )? This is a system function/module built into Visual Basic. This function/module can be used to start a process resource such as launching a website. * Write a module called pingMe( ) that will use Ping.exe to get a response from your IP loopback address of This should include the following line of code. * Shell("Ping.exe", , True) * Write a module called openWebsite( ) that will......

Words: 1808 - Pages: 8

Pt1420 Programming Unit 10 Research & Homework

...Unit 10: Homework and Research Assignment Definition Decision Structure - allows a program to perform actions only under certain conditions. Boolean expression - expressions that can be evaluated as either True or False Iteration - is the repetition of a block of statements within a computer program. Counter-controlled repetition structure - used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next.  Condition controlled - Most programming languages have constructions for repeating a loop until some condition changes. Note that some variations place the test at the start of the loop, while others have the test at the end of the loop.  Pre – test loop - the condition gets evaluated at the beginning of the loop cycle. Therefore, the body of the loop will not get executed if the condition does not hold the very first time. Post – Test loop - the loop condition gets evaluated at the end of the loop cycle. Therefore, the body of the loop will get executed at least once, regardless of the condition. This is a major difference between a pretest loop and a posttest loop. You may choose a posttest loop if the problem description justifies the body of the loop be executed at least once. Repetition Sequence/ Set of statements - A repetition structure causes a statement or set of statements to......

Words: 1912 - Pages: 8

Pt1420 A device that works with binary data is called a DIGITAL device. 4. What are the words that make up a high-level programming language called? The words that make up a high-level programming language are known as KEY WORDS or RESERVED WORDS. 5. What are the short words that are used in assembly language called? The short words that used in assembly language are called MNEMONICS. 6. What is the difference between a compiler and an interpreter? A COMPILER is a program that translates a high-level language program into a separate machine language program. An INTERPRETER is a program that both translates and executes the instructions in a high-level language program. 7. What type of software controls the internal operations of the computer’s hardware? An operating system controls the internal operations of the computer’s hardware. Unit 1 Research Assignment 1   * what were the five popular programming languages in each of the following decades: 1970s, 1980s, 1990s, and 2000s?   * Who was the creator of each of these languages?   * When was each of these languages created? Was there a specific motivation behind the creation of these languages? If so, what was it? 1970s Pascal Created by Niklaus Wirth in 1970. Its main purpose was to teach people how to the basics of structured programming. 1980s – The programming language was Python, which was created by Guido van Rossum. It’s more of a scripting language and allows users to produce......

Words: 483 - Pages: 2

Pt1420 1

...Bradley Griffin Keith Warren PT1420 Unit 2 Assignment 1: Homework Short Answer: 1. If the problem is program assignment of some sort, than the first step would be to design the basis of the program in pseudocode to gain a clear picture of what kind of commands will work where, then move into flowcharting to start putting together the logic. b. If the problem is an issue in the code that is preventing it from executing, than the first thing that should be done is to look over the program for syntax errors and logic errors.  2. Pseudocode is fake code. This is where a programmer writes out the code without worry of syntax or logic errors to get a visual feel of how the program should unfold. 3. Input, Process, and Output 4. User-Friendly is a term used to describe programs that are easy to use. Algorithm Workbench: 1. A. Display “Height” B. Input height C. Display “Here is the height you entered:”, height 2. A. Display “Favorite Color” B. Input Favorite Color C. Display “Here is your favorite color you entered:”, color Programming Exercises: 1. Personal Information 1 Display “Name” 2 Input Name 3 Display “Here is the name you have entered:”, name 4 Display “Address with city, state, and ZIP” 5 Input address with city, state, and ZIP 6 Display “This is the address you have entered:”, address with city, state, and ZIP 7 Display “Telephone number” 8 Input telephone number 9 Display “This is the telephone number you have entered:”,......

Words: 277 - Pages: 2

Home Page » Computers and Technology Pt1420 Unit 1 in: Computers and Technology Pt1420 Unit 1 “Unit 1 Assignment 1” Itt Technical Institute Intro to Programming – Pt1420 Unit 1 Assignment 1 Short Answer Questions 1.

...Home Page » Computers and Technology Pt1420 Unit 1 In: Computers and Technology Pt1420 Unit 1 “Unit 1 Assignment 1” ITT Technical Institute Intro to Programming – PT1420 Unit 1 Assignment 1 Short Answer Questions 1. Why is the CPU the most important component in a computer? The reason the CPU is the most important component in a computer is because without the CPU you can’t run any software. 2. What number does a bit that is turned on represent? What number does a bit that is turned off represent? The number in a bit that represents a turned on position is 1. The number in a bit that represents a turned off position is 0. 3. What would call a device that works with binary data? A digital device is a device that works with binary data. 4. What are the words that make up a high-level programming language called? Keywords or Reserved Words are words that make up a high-level programming language. 5. What are short words that are used in assembly language called? Mnemonics are short words that are used in assembly language. 6. What is the difference between a compiler and an interpreter? The difference between a compiler and an interpreter is that a compiler translates high-level language into separate machine language program while an interpreter translates AND executes the instructions in a high-level language program. 7. What type of software controls the internal operations of the computer’s hardware? An......

Words: 393 - Pages: 2

25.04.1811:35 Uhr Grease Lovestoryx265 0 / 01.559 Hits VID P2P DDL 0 Kommentare | Professional Cardiology Stethoscope Black, 14a Life Limited Warranty | jantes alu voiture