-
Language
Visual Basic .Net
-
Description
Create a pseudocode based on the calculation on Student grades restricted to below conditions
- The user must input the Marks based on each Of Assessment: Q1, Q2, Q3, Project 1, Project 2, Assignment 1, Assignment 2, Midterm, Final.
- The Distribution Percentage of each Type of Assessment are listed below. Calculate the total Marks based on the input marks for each assessment.
| Assessment | Percentage (%) |
| Quiz (Q1 to Q3) | 9 |
| Project (Project 1 and Project 2) | 30 |
| Assignment (Assignment 1 and Assignment 2) | 16 |
| Midterm | 15 |
| Final | 30 |
- Below is the Grade based on Marks. Output the Grade based on the calculated marks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Module StudentGradesCalculation
Sub Main()
Dim Assignment_1, Assignment_2, Final, Marks, Midterm As Double
Dim Point, Project_1, Project_2, Q1, Q2 As Double
Dim Q3 As Double
Console.Write("Enter the value of Assignment 1: ")
Assignment_1 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Assignment 2: ")
Assignment_2 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Final: ")
Final = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Midterm: ")
Midterm = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Project 1: ")
Project_1 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Project 2: ")
Project_2 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Q1: ")
Q1 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Q2: ")
Q2 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Q3: ")
Q3 = Double.Parse(Console.ReadLine())
Marks=(Q1+Q2+Q3)*0.09/3+(Project_1+Project_2)*0.3/2+(Assignment_1+Assignment_2)*0.16/2+Midterm*0.15+Final*0.3
Point=0
If Marks>=90 And Marks<=100 Then
Console.WriteLine("Grade: A+")
Point=4
End If
If Marks>=80 And Marks<90 Then
Console.WriteLine("Grade: A")
Point=4
End If
If Marks>=75 And Marks<80 Then
Console.WriteLine("Grade: A-")
Point=3.67
End If
If Marks>=70 And Marks<75 Then
Console.WriteLine("Grade: B+")
Point=3.33
End If
If Marks>=65 And Marks<70 Then
Console.WriteLine("Grade: B")
Point=3
End If
If Marks>=60 And Marks<65 Then
Console.WriteLine("Grade: B-")
Point=2.67
End If
If Marks>=55 And Marks<60 Then
Console.WriteLine("Grade: C+")
Point=2.33
End If
If Marks>=50 And Marks<55 Then
Console.WriteLine("Grade: C")
Point=2
End If
If Marks>=45 And Marks<50 Then
Console.WriteLine("Grade: C-")
Point=1.67
End If
If Marks>=40 And Marks<45 Then
Console.WriteLine("Grade: D+")
Point=1.33
End If
If Marks>=35 And Marks<40 Then
Console.WriteLine("Grade: D")
Point=1
End If
If Marks>=30 And Marks<35 Then
Console.WriteLine("Grade: D-")
Point=0.37
End If
If Marks<30 Then
Console.WriteLine("Grade: E")
End If
Console.WriteLine("Value of Marks: " & Marks)
Console.WriteLine("Value of Point: " & Point)
Console.WriteLine()
Shell ("cmd /c pause", AppWinStyle.NormalFocus, True)
End Sub
End Module
Sub Main()
Dim Assignment_1, Assignment_2, Final, Marks, Midterm As Double
Dim Point, Project_1, Project_2, Q1, Q2 As Double
Dim Q3 As Double
Console.Write("Enter the value of Assignment 1: ")
Assignment_1 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Assignment 2: ")
Assignment_2 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Final: ")
Final = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Midterm: ")
Midterm = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Project 1: ")
Project_1 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Project 2: ")
Project_2 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Q1: ")
Q1 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Q2: ")
Q2 = Double.Parse(Console.ReadLine())
Console.Write("Enter the value of Q3: ")
Q3 = Double.Parse(Console.ReadLine())
Marks=(Q1+Q2+Q3)*0.09/3+(Project_1+Project_2)*0.3/2+(Assignment_1+Assignment_2)*0.16/2+Midterm*0.15+Final*0.3
Point=0
If Marks>=90 And Marks<=100 Then
Console.WriteLine("Grade: A+")
Point=4
End If
If Marks>=80 And Marks<90 Then
Console.WriteLine("Grade: A")
Point=4
End If
If Marks>=75 And Marks<80 Then
Console.WriteLine("Grade: A-")
Point=3.67
End If
If Marks>=70 And Marks<75 Then
Console.WriteLine("Grade: B+")
Point=3.33
End If
If Marks>=65 And Marks<70 Then
Console.WriteLine("Grade: B")
Point=3
End If
If Marks>=60 And Marks<65 Then
Console.WriteLine("Grade: B-")
Point=2.67
End If
If Marks>=55 And Marks<60 Then
Console.WriteLine("Grade: C+")
Point=2.33
End If
If Marks>=50 And Marks<55 Then
Console.WriteLine("Grade: C")
Point=2
End If
If Marks>=45 And Marks<50 Then
Console.WriteLine("Grade: C-")
Point=1.67
End If
If Marks>=40 And Marks<45 Then
Console.WriteLine("Grade: D+")
Point=1.33
End If
If Marks>=35 And Marks<40 Then
Console.WriteLine("Grade: D")
Point=1
End If
If Marks>=30 And Marks<35 Then
Console.WriteLine("Grade: D-")
Point=0.37
End If
If Marks<30 Then
Console.WriteLine("Grade: E")
End If
Console.WriteLine("Value of Marks: " & Marks)
Console.WriteLine("Value of Point: " & Point)
Console.WriteLine()
Shell ("cmd /c pause", AppWinStyle.NormalFocus, True)
End Sub
End Module