Menu

Explain Purpose Following Code State Different Types Variable Used K 1 R Y R Y R Y Student Q43793228

(i) Explain the purpose of the following code, and state all the different types of variable used. (a) k=1; r=Y; while (r==

Can you write the scripts for a ii) and b)? Thank you.

(i) Explain the purpose of the following code, and state all the different types of variable used. (a) k=1; r=’Y’; while (r==’Y’)|(r==’y’) Student(k).Surname=input(‘Enter name: ‘,’s’); Student(k).StudentID=input(‘ Enter ID: ‘); Student(k).Score=input (‘Enter score: ‘); r=input (‘Continue (Y/N)’,’s’); k=k+1; end (ii) Rewrite the code above so that a grade is additionally stored according to the following criteria: Grade Score A 270 260 and <70 250 and <60 D 240 and <50 Fail <40 Write a script to find and display the sum of the first n terms of the following (b) series correct to 2 decimal places: 1 3 + 8. 2’4 1. Show transcribed image text (i) Explain the purpose of the following code, and state all the different types of variable used. (a) k=1; r=’Y’; while (r==’Y’)|(r==’y’) Student(k).Surname=input(‘Enter name: ‘,’s’); Student(k).StudentID=input(‘ Enter ID: ‘); Student(k).Score=input (‘Enter score: ‘); r=input (‘Continue (Y/N)’,’s’); k=k+1; end (ii) Rewrite the code above so that a grade is additionally stored according to the following criteria: Grade Score A 270 260 and

Expert Answer


Answer to (i) Explain the purpose of the following code, and state all the different types of variable used. (a) k=1; r=’Y’; while…

OR