1. Write a Python program that first asks the user how many students are in the class.
Then,
using a for loop, the program should repeat for each student by asking for the student’s
name and their test score (a number between 0 and 100). The program should then use
if, elif, and else statements to decide the result: if the score is 80 or above, it should print
"Excellent"; if the score is between 50 and 79, it should print "Pass"; and if the score is
below 50, it should print "Fail". Finally, the program should display each student’s name,
score, and result.
2. Write a Python program that first asks the user how many numbers they want to enter.
Then, using a for loop, the program should repeat for each number by asking the user to
enter a number. The program should use an if-else statement to check whether the
number is even or odd and display the number along with its result (Even or Odd). At the
end of the program, it should display the total count of numbers that are even.
3. Write a Python program that analyses students’ test results. The program should first ask
the user how many students are in the class and then use a for loop to repeat for each
student by asking for the student’s name and their test score (0–100). The program
should validate the score, and if it is less than 0 or greater than 100, display "Invalid
score" and ask for the score again. Using if, elif, and else statements, the program
should assign a grade based on the score: A for 80–100, B for 65–79, C for 50–64, and
D for below 50, and then display the student’s name, score, and grade. The program
should also keep track of the total score, the number of students who passed (score ≥
50), the highest score, and the lowest score. After all students have been entered, the
program should display the class average score, the total number of students who
passed, and the highest and lowest scores.