Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help
#1
Hey guys, I am very new to Python and messing around with some coding. I am trying to create an Information Program which prints out the information provided in a sentence if you want. I have an issue though, the part in which the user decides if they want the information in a sentence doesn't seem to work. Any help will be appreciated.
#Information about you
print('''
Welcome to the Information Program!
''')
first_name = input('What is your First Name?')
print('Your first name is %s. ' % first_name)
surname = input('What is your Surname?')
print('Your Surname is %s. ' % surname)
print('So, your full name is %s %s ' % (first_name,surname))

dob = input('What is your Date of Birth?')
print('Your date of birth is %s. ' % dob)

birth_place = input('Where were you born?')
print('You were born in %s. ' % birth_place)

def decision():
    decision1 = input('''
Do you want your Full Information?
Type Y for YES or N for NO.
''')
    if decision1.upper() == 'Y':
      print('''
      Your Full name is %s %s, you were born on the %s, and born in %s. ''' % (first_name, surname, dob, birth_place))
    elif decision1.upper() == 'N':
      print('Okay, thank you for using the Information Program!')
    else: 
      print('You have typed in an invalid answer, please run the program again.')
Reply


Messages In This Thread
Need some help - by Volby - May-05-2018, 05:06 PM
RE: Need some help - by buran - May-05-2018, 05:44 PM
RE: Need some help - by Volby - May-05-2018, 05:48 PM
RE: Need some help - by buran - May-05-2018, 05:59 PM
RE: Need some help - by Volby - May-05-2018, 06:00 PM
RE: Need some help - by buran - May-05-2018, 06:05 PM
RE: Need some help - by Volby - May-05-2018, 06:07 PM
RE: Need some help - by buran - May-05-2018, 06:55 PM
RE: Need some help - by Volby - May-05-2018, 08:38 PM
RE: Need some help - by buran - May-05-2018, 08:50 PM
RE: Need some help - by Volby - May-05-2018, 09:03 PM
RE: Need some help - by buran - May-05-2018, 09:14 PM

Forum Jump:

User Panel Messages

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