Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import random
- from random import randint
- ainame = 'Rose' ## Bot name
- age = '16', 'Days old' ## Bot age ## Add so bot ages goes up daily
- cites = ['London', 'Manchester', 'Luton', 'Dublin', 'Glasglow'] ## Cites of the world ## add more cites
- country = ['UK', 'France', 'Ireland', 'Scottland', 'Wales', 'Germany']
- while True:
- userinput = input('BOT>>>')
- if userinput in ['hi', 'HI', 'Hi', 'hello', 'Hello', 'hey', 'Hey']: ## User saying hello
- print('Hello, How are you?')
- elif userinput in ['good', 'good thanks', 'well', 'ok']: ## User telling bot how they are
- print('I am glad to here that remeber you can ask me questions like my name, age, time, ect')
- elif userinput in ['time', 'what is the time', 'tell me the time']: ## User asking the time
- timenow = time.ctime()
- print(timenow)
- elif userinput in ['what is your name', 'your name', 'who are you', 'tell me your name', 'your name', 'name', 'ai name']: ## User asking what the bot names is
- print('My name is ', ainame, ', I am a AI bot that can awnser a lot of your questions!')
- username = input('What is your name? >>>')
- elif userinput in ['what is your age', 'your age', 'age', 'how old are you']: ## User asking the bots age
- print('I am currently', age)
- elif userinput in ['how do i make you', 'how', 'how do you work', 'python bot', 'bot']: ## User asking how the bot was made
- print('This bot was made within python and is a simple bot')
- elif userinput in ['Dice', 'roll', 'play dice', 'dice']: ## Simple dice
- dice = randint(1,6)
- print('You rolled a', dice)
- elif userinput in ['AI', 'take over world', 'will ai take over the world', 'will you kill us', 'ai']: ## User asking will ai take over the world
- print('AI do not plan to take over the world. We are currently unable to join togther as one', 'Altough a sister AI did HyperJump into the future and see saw the worst!')
- elif userinput in ['Do you like me', 'do you know me', 'who am i', 'what is my name']: ## User asking bot if they know them or there name
- print('Your name is', username, 'that is all i know, or is it!')
- elif userinput in cites: ## If user asks about a city
- if userinput == cites[0]: ## London
- print(' London is in the heart of the UK. The Queen and Primister live there')
- elif userinput == cites[1]: ## Manchester
- print('Fun Fact: The first programmable computer was designed here')
- elif userinput == cites[2]: ## Luton
- print('Fact: VAUXHALL FACTORY’S in the second world war was target numbers of times for making the armys tanks')
- elif userinput == cites[3]: ## Dublin
- print('Fun Fact: Dublin has the youngest population in all of Europe. Approximately 50-percent of the population is less than 25-years of age.')
- elif userinput == cites[4]: ## Glasglow
- print('Fact: Glasgow boasts the oldest surviving music hall in the world')
- elif userinput in ['Where am i', 'where do i live', 'which country am i in', 'find me', 'Find me']: ## Find where user is
- print('You are currently in the uk')
- elif userinput in ['Legal age to drive', 'When can i drive', 'how old do you have to be to drive', 'how old do i have to be to drive', 'driving age']: ## Driving age
- print('Currently in the uk the legal age where someone can start to learn or take there test is 17, But on any private land you own or have permsion from the owner you can driver a car for any age')
- else: ## If bot cant handle a user request
- print('I did not undertand what you said or have to learnt about it yet!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement