+ 2

Write an if-else statement that output the word passed provided the value of the variable exam is greater than or equal to 60

1st Jul 2017, 12:34 PM
Aderibigbe Ebenezer Adewale
Aderibigbe Ebenezer Adewale - avatar
3 Answers
+ 2
language? Python: return "Passed" if exam >= 60 else "Failed" JavaScript: return (exam >= 60) ? "Passed" : "Failed"
1st Jul 2017, 1:50 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
if (exam>=60) { Console.WriteLine("Passsed"); } else { Console.WriteLine("Not passed"); }
1st Jul 2017, 1:46 PM
Peshkawt Mahmood
Peshkawt Mahmood - avatar
0
Write an if-else statement that outputs the word Passed provided the value of the variable exam is greater than or equal to 60 and also the value of the variable programsDone is greater than or equal to 10. Otherwise, the if-else statement outputs the word Failed. The variables exam and programsDone are both of type int.
1st Mar 2024, 7:08 AM
Nimona Kebede
Nimona Kebede - avatar
Hot today
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes