...Lab 8.1 Step 2: The hour is 1 continue loop till the hour is 24 then stop. Step 3: Constant Integer Max_Minutes = 60 Declare Integer minutes For minutes = 1 to Max_Minutes Display “The minute is “, minutes End For Step 4: Constant Integer Max_Seconds = 60 Declare Integer seconds For seconds = 1 to Max_Seconds Display “The second is “, seconds End For Step 6: The number is 2 The number is 4 The number is 6 The number is 8 The number is 10 Step 7: Constant Integer Max_VALUE = 200 Declare Integer counter For counter = 20 to Max_VALUE step 20 Display “The number is “, counter End For Step 9: Enter the number of students in class Display however many numbered students you enter Step 11: Loop five times, each asking you to enter a number Displaying the total at the end Step 12: Declare Integer counter Declare Integer totalAge = 0 Declare Real averageAge = 0 Declare Integer age Declare Integer number Display “How many ages do you want to enter: “ Input number For counter = 1 to number Display “Enter age “ Input age Set totalAge = totalAge + age End For averageAge = totalAge / number Display “The average age is “, averageAge Lab 8.2 Lab 8.3 Module Module1 Sub Main() Dim anotherDay As String = "yes" While anotherDay = "yes" Dim totalSpeed As Double = 0 Dim averageSpeed As Double = 0 enterSpeeds(totalSpeed) calcAverage(totalSpeed, averageSpeed) ...
Words: 324 - Pages: 2
...Introduction to Programming Unit 10 Assignment 1 Short Answer 1. * Open the file – Opening the file creates a connection between the file and a program; this allows the program to read data from the file. * Process the file – Data is either read from the file or written to the file * Closing the file – The file must be closed when a program is finished using it. Closing the file disconnects the file from the program. 2. The file must be closed so the program will force any unsaved data in the buffer to be written to the file. 4. The file will not be erased, and any new data will be written at the end of the file’s current contents. 5. The program will create a new file. Algorithm Workbench 1. Declare OutputFile myFile Open myFile “my_name.dat” Write myFile “fatima” Close myFile 2. Declare InputFile myFile Declare String name1 Open myFile “my_name.dat” Read myFile name1 Close myFile Display ”Hello! My name is,” 3. Declare OutputFile numberList Declare Integer counter = 1 Open numberList “number_list.dat” For counter = 1 to 100 Write numberList, counter Next counter End For Close numberList 4. Declare InputFile number_list Declare Integer myNumber Open number_list ”number_list.dat" Display "Here are the numbers: " While NOT eof (number_list) Read numberList myNumber Display myNumber End While Close myName Programming Exercise Pg. 410 1. Declare...
Words: 291 - Pages: 2
...Pt 1420 Unit 10 Homework Introduction to Programming Unit 10 Assignment 1 Short Answer 1. * Open the file – Opening the file creates a connection between the file and a program; this allows the program to read data from the file. * Process the file – Data is either read from the file or written to the file * Closing the file – The file must be closed when a program is finished using it. Closing the file disconnects the file from the program. 2. The file must be closed so the program will force any unsaved data in the buffer to be written to the file. 4. The file will not be erased, and any new data will be written at the end of the file’s current contents. 5. The program will create a new file. Algorithm Workbench 1. Declare OutputFile myFile Open myFile “my_name.dat” Write myFile “fatima” Close myFile 2. Declare InputFile myFile Declare String name1 Open myFile “my_name.dat” Read myFile name1 Close myFile Display ”Hello! My name is,” 3. Declare OutputFile numberList Declare Integer counter = 1 Open numberList “number_list.dat” For counter = 1 to 100 Write numberList, counter Next counter End For Close numberList 4. Declare InputFile number_list Declare Integer myNumber Open number_list ”number_list.dat" Display "Here are the numbers: " While NOT eof (number_list) Read numberList myNumber Display myNumber End While Close myName Programming Exercise Pg. 410 1. Declare Integer number Declare...
Words: 296 - Pages: 2
...Programming Development – Personal Learning Management Programming Development: Personal Learning Management Part 3 Author: Stephanie Heinrichs University of Phoenix – PRG 211 3/22/14 Programming Development: Personal Learning Management The part of the program I believe to need an array would be the entire program. The Subject, the Classes, the weeks, the keywords, and the notes. I am still unsure as to how the arrays work, I have been trying to practice them, but there is not much in the way of instruction on how to use them. I know it can be a list or a table, which works well with the program. For example, the program can be a table starting from the subject, breaking down into the classes, which break down into the weeks that break down into the keywords and the notes. In my opinion, the only way the program could be put together in its simplest form would be in an array. Using an array can reduce the number of variable names needed in a program because a single array can be used instead of a collection of simple variables to store related data (Venit, Stewart & Drake, Elizabeth; Prelude to Programming Concepts and Design; Chapter 6- Arrays: Lists and Tables.). So using an array is the best way to simplify my entire program. The best part of the array is being able to set up the search for the index of keywords. It will make being able to type in the keyword...
Words: 807 - Pages: 4
...CUSTOMER RECORD:- Option Explicit Dim f Private Sub Command1_Click() On Error Resume Next f = InputBox("Input Service ID or Family name", "Find") If f <> "" Then Data1.RecordSource = ("select * from tblebill where ServiceIDNo = '" & f + "' or FamilyName= '" & f + "'") Data1.Refresh End If End Sub Private Sub Command2_Click() On Error Resume Next Data1.RecordSource = ("select * from tblebill order by ServiceIDNo asc") Data1.Refresh End Sub Private Sub Command3_Click() On Error Resume Next Dim a As String a = Data1.Recordset.RecordCount MsgBox ("Total record " + a), vbInformation, "Message" End Sub Private Sub Command4_Click() On Error Resume Next Data1.RecordSource = ("Select * from tblebill where ServiceIDNo <> ' '") Data1.Refresh End Sub Private Sub Command5_Click() On Error Resume Next Data1.RecordSource = ("select * from tblebill order by ServiceIDNo desc") Data1.Refresh End Sub Private Sub Form_Load() Data1.DatabaseName = App.Path + "\dbbilling.mdb" End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) On Error Resume Next If MsgBox("Exit?", vbYesNo + vbQuestion, "Message") = vbNo Then Cancel = True End If End Sub SERVICE APPLICATION:- K Private Sub cmddisabled_Click() On Error Resume Next txtdate.Enabled = False Text1.Enabled = False Text2.Enabled = False Text3.Enabled...
Words: 3691 - Pages: 15
...Xinwei Liu BA_512 02/12/2015 The Improvement of Play Pumps Program Trevor Field, the founder of Play Pumps International, wanted to help rural people acquire clean water by installing Play Pumps that could produce sufficient water for up to 200,000 people when children play carousel. However, after a few years, this program broke down and Play Pump became a failed product. But not all of the similar products have the similar trouble. The hydraulic ram pump of Green Empowerment is also a kind of pump product and it is durable and reliable. So, in order to improve the play pump, stimulating green empowerment is important. After analyzing this company and its product, the field investigation and finding appropriate cooperation companies are significantly essential to success in this business. First of all, field investigation is an important and fundamental factor in developing a product. Without this factor, the product will fail no matter how good it is. Take Play Pumps International as an example, this company had sufficient funds and a good product, but it only focused on installing them and ignored whether South Africans really needed it or not. A number of Play Pumps could not acquire enough energy to take water from an underground source because of missing field investigation, which led to a serious problem that in some places there are not sufficient kids to play merry-go-round to offer the power for driving the Play Pumps. However, Green Empowerment does the fieldwork...
Words: 626 - Pages: 3
...Lab 8.1 Step 2: The hour is 1 continue loop till the hour is 24 then stop. Step 3: Constant Integer Max_Minutes = 60 Declare Integer minutes For minutes = 1 to Max_Minutes Display “The minute is “, minutes End For Step 4: Constant Integer Max_Seconds = 60 Declare Integer seconds For seconds = 1 to Max_Seconds Display “The second is “, seconds End For Step 6: The number is 2 The number is 4 The number is 6 The number is 8 The number is 10 Step 7: Constant Integer Max_VALUE = 200 Declare Integer counter For counter = 20 to Max_VALUE step 20 Display “The number is “, counter End For Step 9: Enter the number of students in class Display however many numbered students you enter Step 11: Loop five times, each asking you to enter a number Displaying the total at the end Step 12: Declare Integer counter Declare Integer totalAge = 0 Declare Real averageAge = 0 Declare Integer age Declare Integer number Display “How many ages do you want to enter: “ Input number For counter = 1 to number Display “Enter age “ Input age Set totalAge = totalAge + age End For averageAge = totalAge / number Display “The average age is “, averageAge Lab 8.2 Lab 8.3 Module Module1 Sub Main() Dim anotherDay As String = "yes" While anotherDay = "yes" Dim totalSpeed As Double = 0 Dim averageSpeed As Double = 0 enterSpeeds(totalSpeed) calcAverage(totalSpeed, averageSpeed) ...
Words: 324 - Pages: 2
...CASE SELECT Private Sub Form_Load() Text1.Text = a Text2.Text = b End Sub Private Sub Text1_Change() Dim ntemp As Integer ntemp = Val(Text1.Text) Select Case ntemp Case Is < 0 Text2.Text = "ICE" Case Is = 0, Is < 100 Text2.Text = "WATER" Case Is > 100 Text2.Text = "STEAM" End Select End Sub IF THEN ELSE Private Sub Form_Load() Text1.Text = nText1 Text2.Text = ntext2 End Sub Private Sub Text1_Change() Dim Ntemp As Integer Ntemp = Val(Text1.Text) If Ntemp < 0 Then Text2.Text = "ICE" ElseIf Ntemp >= 0 And Ntemp <= 100 Then Text2.Text = "WATER" ElseIf Ntemp > 100 Then Text2.Text = "STEAM" End If End Sub PRACTICE Private initialval As Integer Const condeluxe = 180, conspecial = 250, conprimo = 290 Private Sub Form_Load() Text1.Text = noval1 Text2.Text = noval2 Text3.Text = noval3 Option1 = False Option2 = False Option3 = False End Sub Private Sub Option1_Click() Check1.Value = 1 Check2.Value = 0 Check3.Value = 1 Check4.Value = 0 Check5.Value = 1 Check6.Value = 0 Check7.Value = 0 Text1.Text = Str(condeluxe) Text2.Text = initialval Text3.Text = initialval Option1.Value = True Option2.Value = False Option3.Value = False End Sub Private Sub Option2_Click() Check1.Value = 1 Check2.Value = 1 Check3.Value = 1 Check4.Value = 1 Check5.Value = 1 Check6.Value = 0 Check7.Value = 0 Text1.Text = Str(conspecial) Text2.Text = initialval Text3.Text = initialval Option1.Value = False Option2.Value =...
Words: 340 - Pages: 2
...For your reference, the following formulae are listed: 1) Transmission rate = (Baud rate) (bits per baud) 2) Nyquist’s Theorem: C = 2 W log2(M) Where W is the bandwidth in Hz, M # of detectable events (a.k.a. signal elements) C is the channel capacity in bits per second 3) Shannon’s Law: C = W log2(1 + S/N) Where W is the bandwidth in Hz, S/N is the signal power to noise power ratio, C is the channel capacity in bits per second 4) The ratio P2/P1 expressed in decibel is: 10 log10(P2/P1) -------------------------------------------------------------------------------------------- 1. Given the following communication diagram, identify each of the blocks appropriately as DTE, or DCE, or CC (communication channel) Personal Modem Telephone Modem Personal Computer System Computer 2. A channel has a signal to noise ratio of 2047.Shannon’s capacity for the channel is 11 kbps. What is the bandwidth of the channel? C = W log2(1 + S/N) 11000 = W log2(2048) 11000 = W * 11 W=1000 Hz 3. Which of the following is a form of software flow control? a) XON/XOFF b) RTS/CTS c) Selective ARQ d) Continuous ARQ 4. Given three channels A,...
Words: 1504 - Pages: 7
...Norah Stanley NT 1110 July 12, 2014 INPUT AND OUTPUT DEVICES Chapter three of the textbook Computer Structure and Design is all about the different types of input and output devices that are found on many laptops and desktops. Input and output devices are ports that transfer information. Some examples of input and output ports are USB, HDMI and Network ports. I will discuss their functions and where they are located on the Dell Inspiron 3542 laptop. One of the most popular ports I use is the USB port. USB stands for universal serial bus. The three types of USB ports are USB 1.1, USB 2.0 and USB 3.0. Each port transfers data but at different speeds. The USB 1.1 ports has a top speed of 12 Mbps. The USB 2.0 has a top speed of 480 Mbps. The USB 3.0 has the fastest transfer speed of 4,800 Mbps. The Dell Inspiron 3542 has three USB ports. On the left side of the laptop, there is one USB 2.0 and one USB 3.0 port. The right side of the laptop has the other USB 2.0 port. Another port that is used to transfer information is the HDMI port. HDMI stands for high definition multimedia interface. The HDMI port and cord are used to transport digital video and audio from one device to another. Many smartphones, tablets, dvd and blu ray players laptops, high definition televisions, computer monitors and cameras have an HDMI port. Most of the electronic devices I mentioned usually come with one HDMI port. High Definition televisions are equipped with two or three...
Words: 439 - Pages: 2
...Introductıon to telecommunıcatıon - cse040 | Lab Project Report | Cyclic Redundancy Check | | 0701020045 Berat Özbay | 25/4/2012 | Contents 1. Introduction: The Need for Error Detection 3 1.1 Error detection process 3 1.2 Types of errors 4 1.2.1 Single bit error 4 1.2.2 Burst error 4 2. Cyclic Redundancy Check 4 2.1 Background 4 2.2 Idea behind the CRC 5 2.3 CRC Algorithm 5 2.3.1 Modulo 2 Arithmetic 6 2.3.2 Polynomial representation 8 2.3.3 Digital Logic 9 2.4 Why CRC works 10 3. The Generator Polynomial and Error Detection Capabilities 10 3.1 Kinds of error CRC detects 10 4. References 11 1. Introduction: The Need for Error Detection In communication systems, data transmitted over a channel will be exposed to transmission impairments. The most significant impairments are attenuation, delay distortion and noise. These impairments cause the received signal to be different than the transmitted signal which is not a desired situation. An error detection technique allows the receiver to determine if the received data is corrupted or not. 1.1 Error detection process To enable detection of errors, an error detection technique appends (n - k) extra bits to k data bits to be transmitted, creating an n bit frame. Appended bits are called redundant bits because they do not change the data bits and discarded by the receiver as soon as the integrity of the data bits is determined. Redundant bits (also called the checksum) are computed...
Words: 2530 - Pages: 11
...CH 4510: CRE Lab Cyclic Voltammetry \ Aim: To become familiar with using an electrochemical potentiostat To determine the concentration of potassium ferricyanide, K3Fe(CN)6 in an unknown solution using cyclic voltammetry and analyzing the current vs potential graphs Apparatus Required: Potentiostat and electrodes Nitrogen gas for mixing Test tubes Standard flask Reagents required: KNO3 solution 10mM K3Fe(CN)6 solution Theory: Cyclic Voltammetry: Cyclic Voltammetry (CV) is an electrochemical technique which measures the current that develops in an electrochemical cell under conditions where voltage is in excess of that predicted by the Nernst equation. Cyclic voltammetry (CV) is perhaps the most versatile electro-analytical technique for the study of electroactive species. Its versatility dined with ease of measurement has resulted in extensive use of CV in the fields of electrochemistry, inorganic chemistry, organic chemistry and biochemistry. Cyclic voltammetry is often the first experiment performed in an electrochemical study of a compound, biological material, or an electrode surface. The effectiveness of CV results from its capability for rapidly observing the redox behavior over a wide potential range. The resulting voltammogram is analogous to a conventional spectrum in that it conveys information as a function of an energy scan. Instrumentation: The main components of a Cyclic Voltammeter are the Reference electrode...
Words: 2386 - Pages: 10
...composite modified electrode In the first, MWCNTs were refined and functionalized same as previous our work [29]. In breifly, MWCNTs were heated at 350 °C for 2 h and after cooling, it was ultrasonicated for 4 h in concentrated HCl. After that, it was filtered and rinsed with distilled water. MWCNT was functionalized in a mixture of sulfuric acid and nitric acid in 3:1 ratio for 10 h. To provide MWCNT-β-CD/GCE, 10 mg of the MWCNT were combined to 10 mL of 1.0 mM β-CD aqueous solution and was located in ultrasonic for 30 min to obtain dispersed MWCNT. Then 4 μL of MWCNT-β-CD dispersion was cast onto the surface of well–polished GCE and evaporated under the UV lamp. Electropolymerization of DPA was conducted on MWCNT-β-CD/GCE by continuous cyclic voltammetry in 1.0 mM monomer and 5 M H2SO4. To partially oxidize of polymer film, the potential 0.9 V during 180s was applied to working electrode. 2.3. Procedure Proper amounts of ceftazidime in 0.15 M HClO4 were transferred to the voltammetric cell. The accumulation was achieved on open circuit potential for 240 sec whilst the solution was stirred. After the adsorption step, the stirrer was stoped and after 5 sec relaxation the potential was altered from 0.4 to 0.6 V versus Ag/AgCl reference electrode, with a scan rate of 33.3 mV s-1 using differential pulse voltammetric method. A blank solution without ceftazidime was used to take the blank peak current. 1. Result and discussions 3.1 Oxidation of polymer film During the polymer growth...
Words: 1300 - Pages: 6
...increasingly recognized due to their fast electron transfer rates. However, the chemistry available for further functionalizing these electrodes is limited. Here we describe a new approach to the fabrication of VACNTs. SWCNTs were covalently attached to a p-type silicon (100) (Si) wafer surface using a thioester linkage in which the nanotubes were firstly acid treated and then, in the presence of a hydroxylated Si wafer surface, reacted with phosphorus pentasulfide (a mild electrophilic catalyst). The novel nanostructure was characterized using atomic force microscopy (AFM) showing vertical alignment with FTIR spectroscopy indicating pendant thiocarboxylic acid groups for further reaction. In addition, electrochemical properties using cyclic voltammetry indicate that the electrodes have excellent electrochemical properties with an electron transfer rate of 2.98×10−3 cm s−1. © 2009 Elsevier B.V. All rights reserved. 1. Introduction The direct patterned growth of aligned carbon nanotube (CNT) arrays via chemical vapour deposition (CVD) has been widely explored with successful deposition of well-aligned tubes now readily achievable [1]. However, the very nature of CVD deposition has limitations in...
Words: 806 - Pages: 4
...Journal of Alloys and Compounds 521 (2012) 83–89 Contents lists available at SciVerse ScienceDirect Journal of Alloys and Compounds journal homepage: www.elsevier.com/locate/jallcom Nanostructured hybrid cobalt oxide/copper electrodes of lithium-ion batteries with reversible high-rate capabilities Yue Qi, Ning Du ∗ , Hui Zhang, Jiazheng Wang, Yang Yang, Deren Yang State Key Lab of Silicon Materials and Department of Materials Science and Engineering, Zhejiang University, Hangzhou 310027, People’s Republic of China a r t i c l e i n f o Article history: Received 29 October 2011 Received in revised form 5 January 2012 Accepted 7 January 2012 Available online 16 January 2012 Keywords: Cobalt oxide Cu nanorod arrays Electrodeposition Rf-sputtering Anode Lithium-ion batteries a b s t r a c t We report the synthesis of nanostructured hybrid CoO/Cu electrodes through electrodeposition and sputtering. When applied as the anodes for lithium-ion batteries, the CoO/Cu nanowire arrays deliver long cycle life and enhanced power performance than CoO/Cu films. The large accessible surface area and improved electronic/ionic conductivity of the nanostructured electrodes may be responsible for the improved performance. © 2012 Elsevier B.V. All rights reserved. 1. Introduction Rechargeable lithium-ion batteries are currently the dominant power source for portable electronic devices due to their highest energy density among commercial rechargeable batteries...
Words: 4218 - Pages: 17