forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConversation.py
53 lines (40 loc) · 1.18 KB
/
Conversation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# imports modules
import sys
import time
from getpass import getuser
# user puts in their name
name = getuser()
name_check = input("Is your name " + name + "? → ")
if name_check.lower().startswith("y"):
print("Okay.")
time.sleep(1)
if name_check.lower().startswith("n"):
name = input("Then what is it? → ")
# Python lists their name
userList = name
# Python & user dialoge
print("Hello", name + ", my name is Python." )
time.sleep(0.8)
print("The first letter of your name is", userList[0] + ".")
time.sleep(0.8)
print("Nice to meet you. :)")
time.sleep(0.8)
response = input("Would you say it's nice to meet me? → ")
# other dialoge
if response.lower().startswith("y"):
print("Nice :)")
sys.exit()
elif response.lower().startswith("n"):
response2 = input("Is it because I am a robot? → ")
else:
print("You may have made an input error. Please restart and try again.")
sys.exit()
if response2.lower().startswith("y"):
print("Aw :(")
elif response2.lower().startswith("n"):
response3 = input("Then why? → ")
time.sleep(1)
print("Oh.")
else:
print("You may have made an input error. Please restart and try again.")
sys.exit()