num=int(input('inserisci un intero compreso tra 1 e 10: '))
if num>=1 and num<=10:
    if num%2==0:
        print('\n\t il numero', num, 'è pari')
    else:
        print('\n\t il numero', num, 'è dispari')
else:
    print('\n\t il numero non è tra i valori consentiti')

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: