Develop the solutions to the following problems in the form of algorithms Determining whether to assign a pass or fail grade to a student depending on his/her exam mark Determining whether to assign A-F grade to student depending on his/her exam mark Determining what month it is depending on an integer value 1-12 that is entered Determining whether it will rain or not depending on if it is sunny or not**
Question
Develop the solutions to the following problems in the form of algorithms Determining whether to assign a pass or fail grade to a student depending on his/her exam mark Determining whether to assign A-F grade to student depending on his/her exam mark Determining what month it is depending on an integer value 1-12 that is entered Determining whether it will rain or not depending on if it is sunny or not**
Solution
Sure, here are the algorithms for the problems:
- Determining whether to assign a pass or fail grade to a student depending on his/her exam mark:
Algorithm PassOrFailGrade:
Input: studentMark
Output: pass or fail
Step 1: Start
Step 2: If studentMark >= 50 then
Print "Pass"
Else
Print "Fail"
Step 3: End
- Determining whether to assign A-F grade to student depending on his/her exam mark:
Algorithm AssignGrade:
Input: studentMark
Output: Grade (A-F)
Step 1: Start
Step 2: If studentMark >= 90 then
Print "A"
Else if studentMark >= 80 then
Print "B"
Else if studentMark >= 70 then
Print "C"
Else if studentMark >= 60 then
Print "D"
Else if studentMark >= 50 then
Print "E"
Else
Print "F"
Step 3: End
- Determining what month it is depending on an integer value 1-12 that is entered:
Algorithm DetermineMonth:
Input: monthNumber
Output: Month name
Step 1: Start
Step 2: If monthNumber is 1 then
Print "January"
Else if monthNumber is 2 then
Print "February"
Else if monthNumber is 3 then
Print "March"
Else if monthNumber is 4 then
Print "April"
Else if monthNumber is 5 then
Print "May"
Else if monthNumber is 6 then
Print "June"
Else if monthNumber is 7 then
Print "July"
Else if monthNumber is 8 then
Print "August"
Else if monthNumber is 9 then
Print "September"
Else if monthNumber is 10 then
Print "October"
Else if monthNumber is 11 then
Print "November"
Else if monthNumber is 12 then
Print "December"
Step 3: End
- Determining whether it will rain or not depending on if it is sunny or not:
Algorithm WillItRain:
Input: isSunny
Output: Will it rain or not
Step 1: Start
Step 2: If isSunny is true then
Print "It will not rain"
Else
Print "It might rain"
Step 3: End
Similar Questions
Problem StatementA computer science teacher assigned the students a programming task that calculates and displays grades based on test marks. The teacher wants the program to take a student's test mark as input and determine their grade using the following criteria:If the mark is between 90 and 100 (inclusive), assign grade A.If the mark is between 80 and 89 (inclusive), assign grade B.If the mark is between 70 and 79 (inclusive), assign grade C.If the mark is between 60 and 69 (inclusive), assign grade D.If the mark is between 45 and 59 (inclusive), assign grade E.For marks below 45 assign grade F.If the mark is greater than 100 or a negative number, it displays "Invalid input". Help the students to accomplish the given task.Note: This question helps in clearing AMCAT exam.Input format :The input consists of a single integer, representing the student's mark.Output format :The output displays "Grade: " followed by the grade for the given mark based on the given criteria.If the mark is greater than 100 or a negative number, the output displays "Invalid input".Refer to the sample output for the formatting specifications.Code constraints :In the given scenario, the test cases fall under the following constraints:0 ≤ student's mark ≤ 100Sample test cases :Input 1 :100Output 1 :Grade: AInput 2 :85Output 2 :Grade: BInput 3 :79Output 3 :Grade: CInput 4 :63Output 4 :Grade: DInput 5 :56Output 5 :Grade: EInput 6 :0Output 6 :Grade: FInput 7 :-5Output 7 :Invalid inputInput 8 :126Output 8 :Invalid input
Write a Java program that determines a student’s grade. The program will read three types ofscores(quiz, mid-term, and final scores) and determine the grade based on the following rules: -if theaverage score >=90% =>grade=A -if the average score >= 70% and <90% => grade=B -if theaverage score>=50% and <70% =>grade=C -if the average score<50% =>grade=F
In a course, a teacher gives the following tests and assignments:✓ A lab activity that is observed by the teacher and assigned a numeric score.✓ A pass/fail exam that has 10 questions. The minimum passing score is 70.✓ An essay that is assigned a numeric score.✓ A final exam that has 50 questions.Write a class named CourseGrades. The class should have a GradedActivity array named gradesas a field. The array should have four elements, one for each of the assignments previouslydescribed. The class should have the following methods:setLab: This method should accept a GradedActivity object as its argument. This object shouldalready hold the student’s score for the lab activity. Element 0 of the grades field should referencethis object.setPassFailExam: This method should accept a PassFailExam object as its argument. This objectshould already hold the student’s score for the pass/fail exam. Element 1 of the grades fieldshould reference this object.setEssay: This method should accept an Essay object as its argument. (See ProgrammingChallenge 4 for the Essay class. If you have not completed Programming Challenge 4, use aGradedActivity object instead.) This object should already hold the student’s score for the essay.Element 2 of the grades field should reference this object.setFinalExam: This method should accept a FinalExam object as its argument. This object shouldalready hold the student’s score for the final exam. Element 3 of the grades field should referencethis object.toString: This method should return a string that contains the numeric scores and grades for eachelement in the grades array.Demonstrate the class in a program
Predicting whether it will rain or not tomorrow evening at a particular time is a type of _________ problem.
Write a Pseudocode if condition to represent the rule that states if BOTH tests are passed then award Grade P
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.