Need help in entering integers into python and more

98 views Asked by At

I need help in writing a program that allows the user to enter 10 different integers. If the user tries to enter an integer that has already been entered, the program will alert the user immediately and prompt the user to enter another integer. When 10 different integers have been entered, the average of these 10 integers is displayed.

try:
    raw_input("enter number: ")                                                           

I've entered this 10 times which allows me to enter 10 integers, but I am not sure how to alert the user when they have entered an integer that has already been entered. Is it something like this?

except ValueError:
        print("integer already entered")                                                               

I also not too sure how to calculate the average I'm sorry for being vague I have been stuck on this for too long since I am a beginner.

Thank you if u can help

1

There are 1 answers

0
user3636636 On

As other have pointed out, your question is too broad and you have not provided evidence of even attempting the problem.

Regardless, here are a few steps to get you started: