Intro to Programming Essay

730 WordsOct 21, 20133 Pages
NT 1420 LAB 1.2 LAB 1.3 LAB 2.3 Module Module1 Sub Main() Console.WriteLine("This part of the program will code Program 2-6 from page 44") Dim dollars As Double = 2.75 Console.WriteLine("I have " & dollars & " in my account.") dollars = 99.95 Console.WriteLine("But now I have " & dollars & " in my account!") Console.WriteLine("Press any key to continue") Console.ReadLine() End Sub End Module LAB 3.1 Pseudocode Variable Name | Problem (Yes or No) | If Yes, what’s wrong? | Declare Real creditsTaken | No | | Declare Int creditsLeft | Yes | Should say Real not Int | Declare Real studentName | Yes | Should say String not Real | Constant Real creditsNeeded = 90 | No | | Step 2: You can’t have negative credits. The correct form should read: Set creditsLeft = creditsNeeded – creditsTaken Step 3: The student’s name is Nolan Owens Step 4: The Network Systems Administration degree is awarded after 90 credits and Nolan Owens has 70 credits left to take before graduation. Step 5: * //Provide documentation on line on 2 of what this program does * //This program calculates the amount of credits a student needs to take before they can graduate * //Declare variables on lines 4,5,6, and 7 * Declare Real creditsTaken * Declare Real creditsLeft * Declare String studentName * Constant Real creditsNeeded = 90 * //Ask for user input of studentName and creditsTaken on line 9-12 * Display “Please enter your name: “ * Input studentName * Display “Please enter amount of completed credits: “ * Input creditsTaken * //Calculate remaining credits on line 14 * Set creditsLeft = creditsNeeded – creditsTaken * //Display student name and credits left on line 16 and 17 * Display studentName, “has” Display

More about Intro to Programming Essay

Open Document