Python Programming Assessement
Python Programming Assessement
Class Assessment # 1
Duration: 60 Minutes
Total Questions: 5
Total Marks: 50
Task:
Write a Python program that:
4. If the user is younger than 18, print: "You are not eligible to vote."
Sample Output:
Task:
Write a Python program that:
2. Uses a for loop to calculate the sum of all even numbers from 1 to n.
Sample Output:
Task:
Write a Python program that:
2. Uses a for loop to print a right-angled triangle pattern with n rows made of stars
(*).
3. Each row should contain that many stars as the row number.
*
**
***
****
*****
Task:
Write a Python program that:
Requirements:
• Use string manipulation methods such as split() and indexing to extract data.
Sample Output:
Task:
You are asked to write a Python program for a school to generate a simple student
report. The
program should:
1. Ask the user how many students' data they want to enter.
3. After all entries, print the total number of students who passed and failed.
Sample Output:
Total Passed: 2
Total Failed: 1