Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 60 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. def main():
  2.     name1 = input("First name: ")
  3.     name2 = name1 + " " + input("Last name: ")
  4.     years = eval(input("How old are you? "))
  5.     print("Name:",name2)
  6.     print("My age is",years,"and I am",age(years))
  7.  
  8. def age(num):
  9.     if(num < 17):
  10.         x = "younger than the average college student"
  11.     elif( num >= 17 and num < 26):
  12.         x = "college aged"
  13.     else:
  14.         x = "ready for retirement"
  15.         y = x
  16.         return y
  17.  
  18.     print("I see these variables: ", name1, name2, years, x, y)
  19.  
  20. main()
  21. ~
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top