Pt1420 Unit 3 Assignment 1

In: Computers and Technology

Submitted By JGranado
Words 533
Pages 3
Jairo Granado
Prof. M. Ashraf
PT1420
March 28, 2015

Unit 3 Assignment 1: Homework
Short Answer 1. What two things must you normally specify in a variable declaration?
You must specify type & name. 2. What value is stored in uninitialized variables?
An uninitialized variable is by default a 0.

Algorithm Workbench 3. Write assignment statements that perform the following operations with the variable a, b and c.
a) Adds 2 to a and stores the result in b. { b = 2 + a }
b) Multiplies b by 4 and stores the result in a. { a = b * 4}
c) Divides a by 3.14 and stores the result in b. { b = a MOD 3.14 }
d) Subtracts 8 from b and stores the result in a { a = 8 – b } 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) 12 = x + y
b) 4 = z * 2
c) 2 = y / x
d) 6 = y – z 5. Write a pseudocode statement that declares the variable cost so it can hold a real numbers.
Dim cost1 As Double = 0 6. Write pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0.
Dim cost1 As Integer = 0 7. Write a pseudocode statement that assigns the value 27 to the variable count.
Dim count As Integer = 27 8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total.
Total = 10 + 14 9. Write a pseudocode statement that subtracts the variable downpayment from the variable total and assigns the result to the variable due. due = downpayment – total 10. Write a pseudocode statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable totalfee.
First you must make the variables real numbers. 11. example.Dim subtotal As Double = 0
The statement asked for in the question will appear as totalfee = subtotal * 0.15

Programing Excersices…...

Similar Documents

Unit 3 Assignment 1

...Jennifer Schneider – NT 1230 – Client-Server Networking – Unit 3; Assignment 1 IPv6 Addressing 1.) Research the following organizations and explain their involvement with the Internet Public IP Addresses a. American Registry for Internet Numbers: Allocates, transfers and records maintenance of IP addresses as well as reverse DSN. b. Internet Assigned Numbers Authority: Allocates IP addresses from the pools of unallocated addresses to the RIRs according to their needs as described by global policy and to document protocol c. Asia-Pacific Network Information Center: Distributes and maintains IPv6 addresses 2.) Approximately how many IPv4 addresses are possible? There are approximately 4.3 billion IPv4 addresses available. 3.) Approximately how many IPv6 addresses are possible? There are 340,282,366,920,938,463,463,374,607,431,768,211,456 Ipv6 addresses available 4.) Why do you think the world is running out of IPv4 addresses? The internet really started in the 70s as a DARPA research project. At the time, there were 60 or so institutions expected to connect. As the interested research community grew, the addressing scheme was expanded from 8 bits (256 addresses in the predecessor to Internet Protocol (IP) known as Network Control Protocol (NCP)) to 32 bits (the IPv4 addresses we have today). At the time, it was still expected that the internet would serve largely defense, research, and educational institutions. It was essentially a laboratory experiment on a really......

Words: 411 - Pages: 2

Pt1420 Unit 5 Assignment 1

...Short Answer 1. Explain what is meant by the term “conditionally executed”.       Conditionally executed is called a single alternative decision structure because it provides only one alternative path of execution. The action is conditionally executed because it is performed only when a certain condition is true. 2. You need to test a condition and then execute one set of statements if the condition is true. If the condition is false, you need to execute a different set of statements. What structure will you use? I will use the “If” statement because it is a dual alternative decision structure.   3. If you need to a test the value of a variable and use that value to determine which statement or set of statements to execute, which structure would be the most straightforward to use?       The case structure lets the value of a variable or an expression determine which path of execution the program will take.   4. Briefly describe how the AND operator works. The AND operator takes two Boolean expressions as operands and creates a compound Boolean expression that is True only when both sub-expressions are true.   5. Briefly describe how the OR operator works.       The OR operator takes two Boolean expressions as operands and creates a compound Boolean expression that is true when either of the sub-expressions is true. The following is an example of an If-Then statement that uses the OR operator:   6.When determining whether a number is inside a range, which...

Words: 972 - Pages: 4

Unit 3 Assignment 1 Essay

...Alpha Arnold PT1420 – Morning Feb 15, 2014 Unit 3 Assignment 1: Homework Short answers: 5. What two things must you normally specify in a variable declaration? You must specify the variable type and an identifier. 6. What value is stored in uninitialized variables? Some languages assign a default value as 0 to uninitialized variables. In many languages, however, uninitialized variables hold unpredictable values. Algorithm Workbench 3. Write assignment statements that perform the following operations with the variables a,b,c A. set b=a+2 B. set a=b*2 C. set b=a/3.14 D. 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 in of the following statements? A. Set result = 4+8 B. Set result = 2*2 C. Set result = 8/4 D. Set result = 8-2 5. Write a pseudcode 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 hold integers. Initialize the variable with the value 0. Dim cost1 As Integer = 0 7. Write a pseudocode statement that assigns the value 27 to the variable count. Dim count As Integer = 27 8. Write a pseudocode statement that assigns the sum 10 and 14 to the variable total /*Declare variables Total=0 A=10 B=14 Begin Total=A+B end 9. Write a pseudocode statement that subtracts the variable downPayment......

Words: 328 - Pages: 2

Pt1420 - Unit 1 Assignment 1

...UNIT 1 – BOOK REVIEW QUESTIONS (PAGE 26, SHORT ANSWER QUESTIONS #1–6) 1. Why is the CPU the most important component in a computer? a. Without the CPU, the computer could not run software. The CPU is the part of the computer that actually runs the programs. (pg. 3) 2. What number does a bit that is turned on represent? What number does a bit that is turned off represent? b. 1 represents a bit that is turned ON. 0 represents a bit that is turned OFF. (pg. 8) 3. What would you call a device that works with binary data? c. A device that works with binary data is called a DIGITAL device. (pg. 11) 4. What are the words that make up a high-level programming language called? d. The words that make up a high-level programming language are known as KEY WORDS or RESERVED WORDS. (pg. 17) 5. What are the short words that are used in assembly language called? e. The short words that used in assembly language are called MNEMONICS. (pg. 14) 6. What is the difference between a compiler and an interpreter? f. 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. (pg. 17-18) 7. What type of software controls the internal operations of the computer’s hardware? g. An operating system controls the internal operations of the computer’s hardware. (pg. 20) ...

Words: 257 - Pages: 2

Unit 2 Assignment 1 Pt1420

...Unit 2 Assignment 1: Homework Kenneth D. Davis Intro to Programming Short Answer 1. What does a professional programmer usually do first to gain an understanding of a problem? Interview the customer 2. What is pseudocode? Fake Code 3. Computer programs typically perform what three steps? 1. Input is received. 2. Some process is performed on the input. 3. Output is produced. 4. What does the term “user- friendly” mean? The term user- friendly is commonly used in the software business to describe pro-grams that are easy to use. Programs that do not display adequate or correct instruc-tions are frustrating to use, and are not considered user- friendly. One of the simplest things that you can do to increase a program’s user- friendliness is to make sure that it displays clear, understandable prompts prior to each statement that reads keyboard input. 5. What two things must you normally specify in a variable declaration? You must specify the variable type and an identifier 6. What value is stored in uninitialized variables? Some languages assign a default value as 0 to uninitialized variables. In many languages, however, uninitialized variables hold unpredictable values. Algorithm Workbench 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. Set height = 72” Display ‘Enter your Height at Age 21’ Input hEIGHT Display ‘Enter your Height at Age 22’ Input......

Words: 458 - Pages: 2

Unit 3 Assignment 1: Homework

...Dr. Davis PT1420 26 June 2014 Unit 3 Assignment 1: Homework 5. Write a pseudo code statement that declares the variable cost so that so that it can hold real numbers. a. declare real cost 6. Write a pseudo code statement that declares the variable total so that it can hold integers. Initialize the variable with value zero. a. Declare real price = 0.00 display “the original price” input items original price display “price” 3. Write assignment statements that perform the following operations with variables a, b and c. a. set b = a+2 b. set a = b*4 c. set b = a/3.14 d. set a= b-8 7. Write a pseudo code statement that assigns the value 27 to the variable count. A count: = 27 8. Write pseudo code statement that assigns the sum of 10 and 14 to the variable total. a. declare integer total set total = 10+14 display total 9. Write a pseudo code statement that subtracts the variable down payment from the variable total and assigns the result for the variable due. a. declare integer down payment declare integer total declare integer due set due = total – down payment display “down payment “ input down payment 10. Write a pseudo code statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable total fee a. declare real subtotal declare real totalfee set totalfee subtotal * 0.15 display “subtotal” input subtotal display totalfee 4. Assume the variable result,...

Words: 550 - Pages: 3

Unit 3 Assignment 1: Homework

...Kurt Trotter PT1420 Unit 3 Assignment 1 Week 3 07/06/2104 Homework Short Answers 5. You must specify type & name. 6. An uninitialized variable is by default a 0. Algorithm Workbench Review Questions 3) Write assignment statements that perform the following operations with the variable a, b and c. a) Adds 2 to a and stores the result in b. { b = 2 + a } b) Multiplies b by 4 and stores the result in a. { a = b * 4} c) Divides a by 3.14 and stores the result in b. { b = a MOD 3.14 } d) Subtracts 8 from b and stores the result in a { a = 8 – b } 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) 12 = x + y b) 4 = z * 2 c) 2 = y / x d) 6 = y – z 5) Write a pseudocode statement that declares the variable cost so it can hold a real numbers. Dim cost1 As Double = 0 6) Write pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0. Dim cost1 As Integer = 0 7)Write a pseudocode statement that assigns the value 27 to the variable count. Dim count As Integer = 27 8) Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. Total = 10 + 14 9) Write a pseudocode statement that subtracts the variable downpayment from the variable total and assigns the result to the variable due. due = downpayment – total 10) Write a pseudocode statement that...

Words: 417 - Pages: 2

Unit 3 Assignment 1

...Unit 3 Assignment 1: Compare Windows 8 and Windows RT Course Objectives and Learning Outcomes Identify the characteristics of popular mobile operating systems. Compare mobile operating systems to their related desktop operating systems. Identify the characteristics of Windows Phone. Identify differences and similarities between Windows 8 and Windows Phone 8. Assignment Requirements Research Windows 8 and Windows RT on the Microsoft website and write a paper that discusses the implications of an integrated platform. Required Resources Web browser Windows RT website http://windows.microsoft.com/en-us/windows/rt Submission Requirements Submit a one-page paper that compares Windows 8 and Windows RT. The paper should identify five similarities and five differences between the platforms. You should also discuss how an integrated platform affects users and developers. Which operating system is required for mobile application development? Why? Evaluation Criteria Category | # | Criteria | CONTENT, 90% | 1.1 | The paper should identify 5 similarities between Windows 8 and Windows RT. Up to 20 points for this element | | 1.2 | The paper should identify 5 differences between Windows 8 and Windows RT. Up to 20 points for this element | | 1.3 | The paper should discuss how an integrated platform impacts users. Up to 20 points for this element | | 1.4 | The paper should discuss how an integrated platform impacts developers. Up to 20 points for this......

Words: 283 - Pages: 2

Pt1420 Unit 3 Assignment 1 Homework

...Unit 3 Assignment 1 Homework Short Answer: 5. What two thing must you normally specify in a variable declaration? * You must specify the variable type and an identifier. * int n; // type - int, identifier - n 6. What value is stored in uninitialized variables? * is a variable that is declared but is not set to a definite known value before it is used. Algorithm Workbench pg71-72 3) Write assignment statements that perform the following operations with the variable a, b and c. a) Adds 2 to a and stores the result in b. { b = 2 + a } b) Multiplies b by 4 and stores the result in a. { a = b * 4} c) Divides a by 3.14 and stores the result in b. { b = a MOD 3.14 } d) Subtracts 8 from b and stores the result in a { a = 8 – b } 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) 12 = x + y b) 4 = z * 2 c) 2 = y / x d) 6 = y – z 5) Write a pseudocode statement that declares the variable cost so it can hold a real numbers. Dim cost1 As Double = 0 6) Write pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0. Dim cost1 As Integer = 0 7)Write a pseudocode statement that assigns the value 27 to the variable count. Dim count As Integer = 27 8) Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. Total = 10 + 14 9) Write a......

Words: 577 - Pages: 3

Unit 5 Assignment 1 Pt1420

...Short Answer 1. Explain what is meant by the term “conditionally executed”. Conditionally executed is called a single alternative decision structure because it provides only one alternative path of execution. The action is conditionally executed because it is performed only when a certain condition is true. 2. You need to test a condition and then execute one set of statements if the condition is true. If the condition is false, you need to execute a different set of statements. What structure will you use? I will use the “If” statement because it is a dual alternative decision structure. 3. If you need to a test the value of a variable and use that value to determine which statement or set of statements to execute, which structure would be the most straightforward to use? The case structure lets the value of a variable or an expression determine which path of execution the program will take. 4. Briefly describe how the AND operator works. The AND operator takes two Boolean expressions as operands and creates a compound Boolean expression that is True only when both sub-expressions are true. 5. Briefly describe how the OR operator works. The OR operator takes two Boolean expressions as operands and creates a compound Boolean expression that is true when either of the sub-expressions is true. The following is an example of an If-Then statement that uses the OR operator: 6.When determining whether a number is inside a range, which...

Words: 329 - Pages: 2

Unit 3 Assignment 1

...October 1, 2014 NT2580 Unit 3 Assignment 1 There are three key parts I will have to take into account while designing a Remote Access Control Policy for Richman Investments. These three parts (Identification, Authentication and Authorization) will not be all for the Remote Access Control Policy, I will need to include the appropriate access controls for systems, applications and data access. I will also need to include my justification for using the selected access controls for systems, applications and data access. The first part I need to implement for this Remote Access Control Policy is Identification, which is defined in this sense as: physical keys or cards, smart cards, and other physical devices that might be used to gain access to something. What needs to be done for the Remote Access Control Policy is a group member policy needs to be setup which uniquely identifies each user. Users should be identified by rank with higher ranking users requiring more authentications. Each individual user should be assigned to a group based on rank with special permissions. Using this system for Identification will make our company more secure in day to day operations. The second part I need to implement for this remote access control policy is Authentication, which is defined as: what you know or passwords, numeric keys, PIN numbers, secret questions and answers. For remote access, there must be proof that the person is who they say they are every time they attempt to......

Words: 364 - Pages: 2

Unit 3 Assignment 1

...Craig Roxbury Unit 3 Assignment 1 Erica Lanier Video Summary 1 In video 1.07 the lesson is on ports and connectors. There are three different types of ports, those are serial port, parallel port and game port. The serial port is usually male and have 9 or 25 pins. The parallel port is usually female and has 25 pins. The game ports are female and have 15 pins. All of those ports have been replaced by USB ports. The video also discusses how the modem connects to a phone line and converts digital to analog. It explains there are two types of SCSI narrow and wide SCSI, the narrow SCSI has 50 pins and the wide has 68 pins. Video 1.09 teaches that there are two types of monitors, you have CRT and LCD. CRT stands for cathode ray tube and LCD stands for liquid crystal display. The CRT is similar to an old television and the LCD uses thin film transistors and the back lighting is through polarized panels. Your specifications of a monitor include screen size, contrast ratio, refresh rate, response time, interfacing, dot pitchand pixel pitch. Video 1.11 focuses on types of printers and the types of problems that come with each. There is the Dot Matrix, Ink Jet and the laser printers. Overall the videos covered your computer basics and the parts that make it productive. I could comprehend the objective of the videos but they all covered a plethora of information in a matter of minutes, so I feel there was a lot that I missed. Fortunately what I did not catch in the video......

Words: 322 - Pages: 2

Pt1420 Unit 1 Assignment 1

...UNIT 1 – BOOK REVIEW QUESTIONS (PAGE 26, SHORT ANSWER QUESTIONS #1–6)   1. Why is the CPU the most important component in a computer?       a. Without the CPU, the computer could not run software. The CPU is the part of the computer that actually runs the programs. (pg. 3)   2. What number does a bit that is turned on represent? What number does a bit that is turned off represent?       b. 1 represents a bit that is turned ON. 0 represents a bit that is turned OFF. (pg. 8)   3. What would you call a device that works with binary data?       c. A device that works with binary data is called a DIGITAL device. (pg. 11)   4. What are the words that make up a high-level programming language called?       d. The words that make up a high-level programming language are known as KEY WORDS or RESERVED WORDS. (pg. 17)   5. What are the short words that are used in assembly language called?       e. The short words that used in assembly language are called MNEMONICS. (pg. 14)   6. What is the difference between a compiler and an interpreter?       f. 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. (pg. 17-18)   7. What type of software controls the internal operations of the computer’s hardware?       g. An operating system controls the internal operations of the computer’s hardware.......

Words: 257 - Pages: 2

Pt1420 Unit 6 Assignment 1

...Week 06 Assignments Textbook Reading * Chapter 4 * Chapter 5 sections 5.1, 5.2, and 5.3 (pages 196-201) Week 06 Homework From the Gaddis textbook: * Programming Exercises 2, 6 and 9, on pages 160-161 For the Programming Exercises, design a program means write the pseudocode for the program. Except for Programming Exercise 2, your design should include multiple modules, not just main(). Upload a Microsoft Word document with the pseudocode to your shared PT1420 community website or submit a paper copy to your instructor by the beginning of the Week 7 class. Programing Exercises pg. 160-161 2. Areas of rectangles Module Main() Declare width1 integer = 0 Declare length1 integer = 0 Declare width2 integer = 0 Declare length2 integer = 0 Declare area1 integer = 0 Declare area2 integer = 0 Call rectangle1 (width1, length1, area1) Call rectangle2 (width2, length2, area2) Call comparison (rectangle1, rectangle2) Display “press enter to continue” End module Module rectangle1 (value width1 as integer, value length1 as integer, value area1 as integer) Display "Enter the width of rectangle 1” Input width1 Display "Enter the length of rectangle 1" Input length1 area1 = width1 * length1 End module Module rectangle2 (value width2 as integer, value length2 as integer, value area2 as integer) Display "Enter the width of rectangle 2” Input width2 Display "Enter the length of rectangle 2" Input length2 area2 = width2 * length2 End......

Words: 764 - Pages: 4

Pt1420 V1 Unit 2 Assignment 1: Homework

...Unit 2 Assignment 1 Pt1420 Unit 2 Assignment 1: Homework Kenneth D. Davis Intro to Programming Short Answer 1. What does a professional programmer usually do first to gain an understanding of a problem? Interview the customer 2. What is pseudocode? Fake Code 3. Computer programs typically perform what three steps? 1. Input is received. 2. Some process is performed on the input. 3. Output is produced. 4. What does the term “user- friendly” mean? The term user- friendly is commonly used in the software business to describe pro-grams that are easy to use. Programs that do not display adequate or correct instruc-tions are frustrating to use, and are not considered user- friendly. One of the simplest things that you can do to increase a program’s user- friendliness is to make sure that it displays clear, understandable prompts prior to each statement that reads keyboard input. 5. What two things must you normally specify in a variable declaration? You must specify the variable type and an identifier 6. What value is stored in uninitialized variables? Some languages assign a default value as 0 to uninitialized variables. In many languages, however, uninitialized variables hold unpredictable values. Algorithm Workbench 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. Set height = 72” Display ‘Enter your Height at Age 21’ Input hEIGHT Display ‘Enter your Height......

Words: 319 - Pages: 2