Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If Statement
#6
My 2 cents
#! /usr/bin/env python3.8
'''Docstring'''

name = input('Enter your name: ')
age = input('Enter your age: ')
country = input('Enter your country ')



if age < str(18) or country != 'Britain' or country != 'UK':
    print(f'You are not entitled to vote')
else:
    print('You are entitled to vote')
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply


Messages In This Thread
If Statement - by Bobcat - May-02-2020, 03:28 PM
RE: If Statement - by buran - May-02-2020, 03:36 PM
RE: If Statement - by pyzyx3qwerty - May-02-2020, 03:55 PM
RE: If Statement - by buran - May-02-2020, 04:01 PM
RE: If Statement - by buran - May-02-2020, 04:03 PM
RE: If Statement - by menator01 - May-02-2020, 07:24 PM
RE: If Statement - by buran - May-02-2020, 07:27 PM
RE: If Statement - by menator01 - May-02-2020, 07:47 PM
RE: If Statement - by buran - May-02-2020, 07:57 PM
RE: If Statement - by pyzyx3qwerty - May-03-2020, 04:57 AM
RE: If Statement - by menator01 - May-02-2020, 08:00 PM
RE: If Statement - by buran - May-02-2020, 08:14 PM
RE: If Statement - by ndc85430 - May-03-2020, 05:00 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020