Skip to content

Commit d578ee1

Browse files
authored
Create name_display.py
1 parent 34cdeac commit d578ee1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

name_display.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Starting Out with Python (4th Edition).
2+
# Tony Gaddis.
3+
# Page 456.
4+
# Q. 1 Name Display.
5+
6+
name = str(input("Enter Name: "))
7+
name = name.split(" ")
8+
first_name = name[0]
9+
last_name = name[1]
10+
address_name = str(first_name[0].upper() + '.' + last_name[0].upper() + '.')
11+
username = str(first_name[0].lower() + last_name.lower())
12+
print("Name in Address Book: ", address_name)
13+
print("Username: ", username)

0 commit comments

Comments
 (0)