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
Premium Color Primary color Red
Short Answer 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
Premium Real number Addition Statement
Edward Martin PT 1420 Unit7 Assignment1: Homework Short Answer 1. Why should you indent the statement in the body of a loop? By indenting the statements‚ you make them stand out from the surrounding code. This helps you to identify at a glance the statements that are conditionally executed by a loop. 2. Described the difference between pretest loop and posttest loops. A pretest loop tests its condition before each iteration. A posttest loop tests its condition after each iteration. A posttest loop
Premium Real number Addition Integer
PT1420 Introduction to Programming Name: Homework 2 Ch. 2: Short Answer 1-3 (10 points) 1. What does a professional programmer usually do first to gain an understanding of a problem? The first thing a professional programmer will usually do to gain the understanding of a problem is to work directly with‚ and interview the customer. 2. What is pseudocode? Pseudocode is an informal language that has no syntax rules‚ and is not meant to be compiled or executed. 3. Computer programs
Premium Programming language Computer programming Computer program
Unit 9: Functions Course Objectives Covered by this Unit * CO8: Apply techniques to write functions in programs. Unit Learning Outcomes * LO32: Describe the usefulness of functions in computer programs. * LO33: Write functions using pseudocode/flowcharts. * LO34: Differentiate between the various functions created for use in computer programs. * LO35: Write input validation loops and validation functions to check accuracy of input data. Key Concepts * Structures of
Premium Programming language Mathematics Source code
. A port expander is a hardware device designed to allow a user to utilize more than one device on a single port at one time. There are two basic forms of port expanders: internal and external. An internal expander has a connection inside the computer and the only part that is visible to the user is the expansion plate containing multiple ports. An external device plugs into the existing port and then has multiple places to connect. Expanders are made for nearly every type of port‚ but the most
Premium Serial port Universal Serial Bus VGA connector
PT 1420 Unit 10 Assignment1 Short Answer Review Question Described the three steps that must be taken when a file is used by a program. Open the file – it creates a connection between the file and the program. Opening and output file usually creates the file on the disk and allow the program to write data to it. Opening an input file allows the program to read data from the file. Process the file – In this step data is either written to the file (if it is an output file) or read from the file (if
Premium Data Computer Programming language
Rondebosch Boy’s High School INFORMATION TECHNOLOGY – GRADE 11 7 February 2012 PRACTICAL ClASS TEST Examiner: G.Cilliers Time: 60 Minutes ------------------------------------------------- Marks:50 QUESTION 1. Examine the Database called ResidenceDataBase found in the folder called Question 1 SQL and answer the questions that follow: Save your work on your username in a folder called your
Premium English-language films Education UCI race classifications
Part 2 (i) Give a description of the following variables using appropriate graphical displays and summary statistics: gender; time; travel; type; number. Explain what these show about the typical travellers on the system. a) Gender According to the survey results and figure 1‚ the number of respondents for male is 114 and female is 86. This may suggest that there are more males than females travellers travel in the train. b) Time According to the survey results in figure
Premium Question Research methods Research
John Bareswilt Pt1420 Unit 6 Page 1 5.def mix colors ( primary1 ‚ primary2 ) : i f primary1 == primary2 : return primary1 e l i f primary1 == ”red” and primary2 == ”blue” or primary1 == ”blue” and primary2 == ”red ”: return ”purple” e l i f primary1 == ”red” and primary2 == ”yellow” or primary1 == ”yellow” and primary2 == ”red ”: return ”orange” e l i f primary1 == ”yellow” and primary2 == ”blue” or primary1 == ”blue” and primary2 == ”yellow ”: return ”green” global primary1 = input (” Please enter
Premium Color Primary color