Lab 6

Part 1

For the first part of the lab we are supposed to use VI editor to create a program that display grades for classes based on the percentages for each student. The program will ask the user for the student’s name, course code and the grade percentage for that course. After the program receives the inputs, the program will go through the statements until all arguments are met assuming there are no errors and the user inputs the correct information. The student name and the course code should be a string while the grade percentage should be a decimal number. There are a range of numbers that should display the assigned letter grade through If statements.

Lab6script

lab 6 mabel

Part 2

For the second part of the lab we are supposed to use VI editor to create a program that will display the first n numbers and add them up.  The program will ask the user to enter an integer. Once the user enters a number the program will tell the sum of all the numbers. For example, if you insert 5, the output of the script would give would be 15 because its basically doing 5+4+3+2+1=15.

sum

 

mabellab6p2