Problem: Write the Python code of a program called University Application that asks the user enter their name, age, and high school GPA. If the user is at least 18 years old and their school GPA is at least 2.75, display a message telling the user they eligible to apply to study that major. However, in case the user's GPA is below 2.75, display a message telling them that they are not eligible to apply to study at this university. If the user is 17 or 16 years old, and have a GPA of at least 3.0, display a message telling them they can apply for exceptional acceptance. If the user is younger than 16, tell them they must wait until they are older to apply.​

Respuesta :

Th python code of a program that asks the user enter their name, age, and high school GPA and determine if they are eligible for admission is as follows:

x = input("please enter your name: ")

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

z = float(input("Please enter your high school GPA: "))

if y >= 18 and z >= 2.75:

    print(f"You are eligible to apply to study your major")

elif y >= 18  and z < 2.75:

     print("You are not eligible to apply to study your major")

elif y == 16 or y == 17  and z >= 3.0:

    print("You can apply for exceptional acceptance")

else:

    print("You must wait until you are old to apply")

Code explanation:

The code is written in python.

  • The first variable stores the users name.
  • The second variable stores the users age.
  • The third variable stores the users high school GPA.
  • If the users age is greater than or equals to 18 and his/her GPA is equal or greater than 2.75, the user is eligible.
  • else if the users age is greater than or equals to 18 and his/her GPA is less than 2.75, the user is not eligible.
  • else if the user age is 16 or 17 and his/her GPA is equals or greater than 3.0, then they can apply for exceptional acceptance.
  • Else we will print that the users is not old enough to apply if he/she is less than 16 years.

learn more on python code here; https://brainly.com/question/13450046

ACCESS MORE