-
Notifications
You must be signed in to change notification settings - Fork 0
/
manvith game.py
51 lines (40 loc) · 1.58 KB
/
manvith game.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
51
# chatbot introduction
print(' created by manvith')
print('Hello. I am cortona . I am a chatbot')
print('I like to talk to people would you like to talk to me')
name = input('What is your name?: ')
print('Hello', name, ', Nice to meet you')
# get year information
year = input('I am not very good at dates. What \
is the year?: ')
print('Yes, I think that is correct. Thanks! ')
# ask user to guess age
myage = input('Can you guess my age? - enter a \
number: ')
print('Yes you are right. I am ', myage)
# do math to calculate when chatbot will be 100
myage = int(myage)
nyears = 100 - myage
print('I will be 100 in', nyears, 'years')
print('That will be the year', int(year) + \
nyears)
# food conversation
print('I love chocolate and I also like trying out new kinds of food')
food = input('How about you? What is your favorite food?: ')
print('I like', food, 'too.')
question = 'How often do you eat ' + food + '?: '
howoften = input(question)
print('Interesting. I wonder if that is good for your health')
# animal conversation
animal = input('My favorite animal is a giraffe. What is yours?: ')
print(animal,'! I do not like them.')
print('I wonder if a', animal, 'likes to eat', food, '?')
# conversation about feelings
feeling = input('How are you feeling today?: ')
print('Why are you feeling', feeling, 'now?')
reason = input('Please tell me: ')
print('I understand. Thanks for sharing')
# goodbye
print('It has been a long day')
print('I am too tired to talk. We can chat again later.')
print('Goodbye', name, 'I liked chatting with you')