Course Content
Fast-Track Python: iGCSE Programming in 15 Hours

Programming Assignment – Possible Solution

"""  Question 1: Large Number
Write a program that asks the user to enter a number.
If the number is greater than 100, print:

The number is large.

If the number is not greater than 100, the program does nothing."""

number = int(input("Enter the number: "))

if number > 100:
    print("The number is large")


"""Question 2: Voting
Write a program that asks the user to enter their age.
If the age is 18 or more, print:

You are eligible to vote.

        Otherwise, print:

You are not eligible to vote yet. """

age = int(input("Enter your age: "))

if age >= 18:
    print("You are eligible to vote")
else:
    print("You are not eligible to vote yet")


"""Question 3 : Grading
Write a program that asks the user to enter their test score (out of 100).
If the score is 90 or above, print:
Grade: A

If the score is 75 or above but less than 90, print:
Grade: B

Otherwise, print:
Grade: C or below
"""

test_score = int(input("Enter your test score: "))

if test_score >= 90:
    print("Grade A")
elif test_score >= 75:
    print("Grade B")
else:
    print("Grade C or below")
0% Complete
Scroll to Top