-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
67 lines (50 loc) · 1.6 KB
/
bot.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
def greet(bot_name, birth_year):
print("Hello! My name is {0}.".format(bot_name))
print("I was born in {0}.".format(birth_year))
def remind_name():
print('Please jot down your name for me.....')
name = input()
print("What a great name you have, {0}!".format(name))
def guess_age():
print('Your age, please......')
print('Divide your age by 3, 5 and 7 and enter the remainder.')
rem3 = int(input())
rem5 = int(input())
rem7 = int(input())
age = (rem3 * 70 + rem5 * 21 + rem7 * 15) % 105
print("Your age is {0}; It's good time to start quiz part.".format(age))
def count():
print("Now, I'll show you that I'm able to count up to any number you want.")
num = int(input())
counter = 0
while counter <= num:
print("{0} !".format(counter))
counter += 1
def test():
print("Let's put your programming skills to the test.")
print("#include <iostream>")
print("int main() {")
print("int x = 5;")
print("int y = ++x * 5 / x--;")
print("std::cout << x << " " << y << std::endl;")
print("return 0;")
print('}')
answer = '4 6'
guess = str(input())
while guess != answer:
print("Please, Try Again....")
guess = int(input())
print('🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉')
print('Well Done!, Buddy...')
print('🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊')
def end():
print('.................................')
print('Brilliant, Good Work Buddy....')
print('.......BEST OF LUCK........')
input()
greet('MSR', '2019')
remind_name()
guess_age()
count()
test()
end()