Advertisement
Guest User

Untitled

a guest
Apr 14th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.27 KB | None | 0 0
  1. # this program is a hello world program
  2. print ('hello world')
  3. print ('Hello, what is your name?')
  4. userName = input()
  5. nameLength = len(userName)
  6. print('Great to meet you,' + userName)
  7. print('The length of your name is ' + str(nameLength) + ' letters.')
  8. print('What is your age?')
  9. userAge = input()
  10. print('You will be ' + str(int(userAge) + 1) + ' in one year!.')
  11. if userName == 'Ty' or 'Tynan' :
  12.     print('What is your password')
  13.     password = input()
  14. else:
  15.     print ("You're not Ty")
  16.  
  17. if password == 'green123':
  18.     print ('ACCESS GRANTED')
  19.     print ('Welcome')
  20.     print ('What would you like to do?')
  21.     planOfTheDay = input()  
  22.     if planOfTheDay == 'Add':
  23.         print ('type the first number')
  24.         firstNumber = input()
  25.         print ('type the second number')
  26.         secondNumber = input()
  27.         print (int(firstNumber) + int(secondNumber))
  28.     elif planOfTheDay == 'Factorial' or 'factoring' :
  29.         print ('which number would you like the factorial of?')
  30.         factorialNumber = input()
  31.         facNumInt = int(factorialNumber)
  32.         for num in range(facNumInt):
  33.             facNumInt = facNumInt + num
  34.             print (facNumInt)
  35.     elif true:
  36.         print ('Sorry I cannot do that')
  37. else:
  38.     print ('ACCESS DENIED')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement