File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
lesson_07/conditionals/src Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -48,25 +48,25 @@ export function compareStrings(a: string, b: string): number {
4848 */
4949export function convertGpaToLetterGrade ( gpa : number ) : string {
5050
51- if ( gpa >= 3.7 ) {
51+ if ( gpa > 3.7 ) {
5252 return "A"
53- } else if ( gpa >= 3.3 ) {
53+ } else if ( gpa > 3.3 ) {
5454 return "A-"
55- } else if ( gpa >= 3.0 ) {
55+ } else if ( gpa > 3.0 ) {
5656 return "B+"
57- } else if ( gpa >= 2.7 ) {
57+ } else if ( gpa > 2.7 ) {
5858 return "B"
59- } else if ( gpa >= 2.3 ) {
59+ } else if ( gpa > 2.3 ) {
6060 return "B-"
61- } else if ( gpa >= 2.0 ) {
61+ } else if ( gpa > 2.0 ) {
6262 return "C+"
63- } else if ( gpa >= 1.7 ) {
63+ } else if ( gpa > 1.7 ) {
6464 return "C"
65- } else if ( gpa >= 1.3 ) {
65+ } else if ( gpa > 1.3 ) {
6666 return "C-" ;
6767 } else if ( gpa > 1.0 ) {
6868 return "D+" ;
69- } else if ( gpa >= 0.7 ) {
69+ } else if ( gpa > 0.7 ) {
7070 return "D" ;
7171 } else {
7272 return "F"
You can’t perform that action at this time.
0 commit comments