Skip to content

Instantly share code, notes, and snippets.

@alessandrorubio
Created November 27, 2016 19:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alessandrorubio/ee4257a737c3e8f8ca42b8c9bfa5a97b to your computer and use it in GitHub Desktop.
counter=0
initials=0
name1=raw_input("Please enter your first name!")
name2=raw_input("Please enter your middle name!")
name3=raw_input("Please enter your last name!")
while True:
option= str(raw_input("a)Print the length of my name\nb)Print\nc)Exit\nChoose one of the options.")).lower()
if (option=="a"):
print "Your first name has " + str(len(name1)) + " letters."
print "Your second name has " + str(len(name2)) + " letters."
print "Your last name has " + str(len(name3)) + " letters."
elif (option=="b"):
print name1[0] + "." + name2[0] + "." + name3[0]
elif (option=="c"):
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment