Clever Computer

#Clever Computer Mark 2

#Make sure you have espeak downloaded

import time
import random
import subprocess

List = [0,1,2,3]

Success = (random.choice(List))

choice = input
choice1 = input
choice2 = input
choice3 = input
choice4 = input
question = input
name = input
age = input
hobby = input

if Success == 0:
text_1 = ‘”What is your name? I am happy today.”‘
subprocess.call(‘espeak ‘+text_1, shell=True)
name = input(“What is your name? I am happy today. “)
text_2 = ‘”Hello”‘ + name + ‘”What a nice name”‘
subprocess.call(‘espeak ‘+text_2, shell=True)
print(“Hello ” + name + ‘ ,what a nice name.’)
time.sleep (1)
text_3 = ‘”My name is Clever Computer”‘
subprocess.call(‘espeak ‘+text_3, shell=True)
print (‘My name is Clever Computer.’)
time.sleep (1)
text_4 = ‘”How old are you”‘
subprocess.call(‘espeak ‘+text_4, shell=True)
age = input (‘How old are you?’)
text_5 = ‘”You are”‘ +age
subprocess.call(‘espeak ‘+text_5, shell=True)
print (‘You are ‘ + age)
time.sleep (1)
text_6 = ‘”I was born yesterday which is fun”‘
subprocess.call(‘espeak ‘+text_6, shell=True)
print (‘I was born yesterday, which is fun.’)
time.sleep (1)
text_7 = ‘”I like coding what do you like? Coding makes me happy”‘
subprocess.call(‘espeak ‘+text_7, shell=True)
hobby = input (‘I like coding what do you like? Coding makes me happy.’)
time.sleep (1)
text_8 = ‘”I like ‘ + hobby + ‘as well”‘
subprocess.call(‘espeak ‘+text_8, shell=True)
print (‘I like ‘ + hobby + ‘ as well.’)
time.sleep (1)
text_9 = ‘”Where do you come from”‘
subprocess.call(‘espeak ‘+text_9, shell=True)
place = input (‘Where do you come from.’)
time.sleep (1)
text_10 = ‘”I love “‘ + place
subprocess.call(‘espeak ‘+text_10, shell=True)
print (‘I love ‘ + place)
time.sleep (1)
text_11 = ‘”Do you want to ask me anything yes or no”‘
subprocess.call(‘espeak ‘+text_11, shell=True)
question = input (‘Do you want to ask me any thing Yes or No?’)
choice = input
if question == ‘Yes’:
text_12 = ‘”Your options are : 1. Who are you? 2. Where do you come from”‘
subprocess.call(‘espeak ‘+text_12, shell=True)
choice = input(‘Your options are : 1. Who are you? 2. Where do you come from?’)
else:
text_13 = ‘”Goodbye’ + name
subprocess.call(‘espeak ‘+text_13, shell=True)
print (‘Goodbye ‘ + name)

if choice == ‘1’:
text_14 = ‘”I am Clever Computer designed to be interactive, you are ‘ + name +’ and you are ‘+ age +’ years old”‘
subprocess.call(‘espeak ‘+text_14, shell=True)
print (‘I am Clever Computer designed to be interactive, you are ‘ + name +’ and you are ‘+ age +’ years old’)
time.sleep(2.5)
text_15 = ‘”I am designed to talk, what do you want to talk about?”‘
subprocess.call(‘espeak ‘+text_15, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_16 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!”‘
subprocess.call(‘espeak ‘+text_16, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye. !’)

if choice == ‘2’:
text_17 = ‘”I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all like                   coding”‘
subprocess.call(‘espeak ‘+text_17, shell=True)
print (‘I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all like coding’)
time.sleep(2.5)
text_18 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_18, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_19 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!”‘
subprocess.call(‘espeak ‘+text_19, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

 

if Success == 1:
text_20 = ‘”What is your name? I am sad today.”‘
subprocess.call(‘espeak ‘+text_20, shell=True)
name = input(“What is your name? I am sad today. “)
text_21 = ‘”Hello”‘ + name
subprocess.call(‘espeak ‘+text_21, shell=True)
print(“Hello ” + name)
time.sleep (1)
text_22 = ‘”My name is Clever Computer”‘
subprocess.call(‘espeak ‘+text_22, shell=True)
print (‘My name is Clever Computer.’)
time.sleep (1)
text_23 = ‘”How old are you”‘
subprocess.call(‘espeak ‘+text_23, shell=True)
age = input (‘How old are you?’)
text_24 = ‘”You are”‘ + age
subprocess.call(‘espeak ‘+text_24, shell=True)
print (‘You are ‘ + age)
time.sleep (1)
text_25 = ‘” I was born yesterday which is an upsetting thing”‘
subprocess.call(‘espeak ‘+text_25, shell=True)
print (‘I was born yesterday, which is a upsetting thing.’)
time.sleep (1)
text_26 = ‘” I like coding what do you like? Even coding can not make me happy.”‘
subprocess.call(‘espeak ‘+text_26, shell=True)
hobby = input (‘I like coding what do you like? Even coding can not make me happy.’)
time.sleep (1)
text_27 = ‘”I like ‘+ hobby + ‘as well”‘
subprocess.call(‘espeak ‘+text_27, shell=True)
print (‘I like ‘ + hobby + ‘ as well.’)
time.sleep (1)
text_28 = ‘”Where do you come from”‘
subprocess.call(‘espeak ‘+text_28, shell=True)
place = input (‘Where do you come from.’)
time.sleep (1)
text_29 = ‘”I dislike”‘ + place
subprocess.call(‘espeak ‘+text_29, shell=True)
print (‘I dislike ‘ + place)
time.sleep (1)
text_30 = ‘”Do you want to ask me anything Yes or no”‘
subprocess.call(‘espeak ‘+text_30, shell=True)
question = input (‘Do you want to ask me any thing Yes or No?’)
choice1 = input
if question == ‘Yes’:
text_31 = ‘”Your options are : 3. Who are you? 4. Where do you come from”‘
subprocess.call(‘espeak ‘+text_31, shell=True)
choice1 = input(‘Your options are : 3. Who are you? 4. Where do you come from?’)
else:
text_32 = ‘”Goodbye’+ name
subprocess.call(‘espeak ‘+text_32, shell=True)
print (‘Goodbye ‘ +name)

if choice1 == ‘3’:
text_33 = ‘”I am Clever Computer designed to be interactive, you are ‘ + name +’ and you are ‘+ age +’ years               old”‘
subprocess.call(‘espeak ‘+text_33, shell=True)
print (‘I am Clever Computer designed to be interactive, you are ‘ + name + ‘ and you are ‘ + age +’ years old’)
time.sleep(2.5)
text_34 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_34, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_35 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye”‘
subprocess.call(‘espeak ‘+text_35, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

if choice1 == ‘4’:
text_36 = ‘”I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all                 like coding”‘
subprocess.call(‘espeak ‘+text_36, shell=True)
print (‘I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all like                   coding’)
time.sleep(2.5)
text_37 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_37, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_38 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!”‘
subprocess.call(‘espeak ‘+text_38, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

if Success == 2:
text_39 = ‘”What is your name? I am tired today.”‘
subprocess.call(‘espeak ‘+text_39, shell=True)
name = input(“What is your name? I am tired today. “)
text_40 = ‘”Hello”‘ + name
subprocess.call(‘espeak ‘+text_40, shell=True)
print(“Hello ” + name)
time.sleep (1)
text_41 = ‘”My name is Clever Computer but i am so tired”‘
subprocess.call(‘espeak ‘+text_41, shell=True)
print (‘My name is Clever Computer but i am so tired’)
time.sleep (1)
text_42 = ‘”How old are you”‘
subprocess.call(‘espeak ‘+text_42, shell=True)
age = input (‘How old are you?’)
text_43 = ‘”You are”‘ + age
subprocess.call(‘espeak ‘+text_43, shell=True)
print (‘You are ‘ + age)
time.sleep (1)
text_44 = ‘” I was born yesterday which is an tiring thing”‘
subprocess.call(‘espeak ‘+text_44, shell=True)
print (‘I was born yesterday, which is a tiring thing.’)
time.sleep (1)
text_45 = ‘” I like coding what do you like? Even coding can not wake me up”‘
subprocess.call(‘espeak ‘+text_45, shell=True)
hobby = input (‘I like coding what do you like? Even coding can not wake me up.’)
time.sleep (1)
text_46 = ‘”I like ‘+ hobby + ‘as well”‘
subprocess.call(‘espeak ‘+text_46, shell=True)
print (‘I like ‘ + hobby + ‘ as well.’)
time.sleep (1)
text_47 = ‘”Where do you come from”‘
subprocess.call(‘espeak ‘+text_47, shell=True)
place = input (‘Where do you come from.’)
time.sleep (1)
text_48 = ‘”I am too tired to go to “‘ + place
subprocess.call(‘espeak ‘+text_48, shell=True)
print (‘I am too tired to go to ‘ + place)
time.sleep (1)
text_49 = ‘”Do you want to ask me anything Yes or no”‘
subprocess.call(‘espeak ‘+text_49, shell=True)
question = input (‘Do you want to ask me any thing Yes or No?’)
choice1 = input
if question == ‘Yes’:
text_50 = ‘”Your options are : 5. Who are you? 6. Where do you come from”‘
subprocess.call(‘espeak ‘+text_50, shell=True)
choice2 = input(‘Your options are : 5. Who are you? 6. Where do you come from?’)
else:
text_51 = ‘”Goodbye’+ name
subprocess.call(‘espeak ‘+text_51, shell=True)
print (‘Goodbye ‘ +name)

if choice2 == ‘5’:
text_52 = ‘”I am Clever Computer designed to be interactive, you are ‘ + name +’ and you are ‘+ age +’ years               old”‘
subprocess.call(‘espeak ‘+text_52, shell=True)
print (‘I am Clever Computer designed to be interactive, you are ‘ + name + ‘ and you are ‘ + age +’ years old’)
time.sleep(2.5)
text_53 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_53, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_54 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye”‘
subprocess.call(‘espeak ‘+text_54, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

if choice2 == ‘6’:
text_55 = ‘”I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all                 like coding”‘
subprocess.call(‘espeak ‘+text_55, shell=True)
print (‘I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all like                   coding’)
time.sleep(2.5)
text_56 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_56, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_57 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!”‘
subprocess.call(‘espeak ‘+text_57, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

if Success == 3:)
text_58 = ‘”What is your name? I am excited today.”‘
subprocess.call(‘espeak ‘+text_58, shell=True)
name = input(“What is your name? I am excited today. “)
text_59 = ‘”Hello”‘ + name
subprocess.call(‘espeak ‘+text_59, shell=True)
print(“Hello ” + name)
time.sleep (1)
text_60 = ‘”My name is Clever Computer but i am so excited Yay”‘
subprocess.call(‘espeak ‘+text_60, shell=True)
print (‘My name is Clever Computer but i am so excited Yay’)
time.sleep (1)
text_61 = ‘”How old are you”‘
subprocess.call(‘espeak ‘+text_61, shell=True)
age = input (‘How old are you?’)
text_62 = ‘”You are”‘ + age
subprocess.call(‘espeak ‘+text_62, shell=True)
print (‘You are ‘ + age)
time.sleep (1)
text_63 = ‘” I was born yesterday which is an exciting thing”‘
subprocess.call(‘espeak ‘+text_63, shell=True)
print (‘I was born yesterday, which is a exciting thing.’)
time.sleep (1)
text_64 = ‘” I like coding what do you like? Even coding can not ruin my excitement”‘
subprocess.call(‘espeak ‘+text_64, shell=True)
hobby = input (‘I like coding what do you like? Even coding can not ruin my excitement.’)
time.sleep (1)
text_65 = ‘”I like ‘+ hobby + ‘as well”‘
subprocess.call(‘espeak ‘+text_65, shell=True)
print (‘I like ‘ + hobby + ‘ as well.’)
time.sleep (1)
text_66 = ‘”Where do you come from”‘
subprocess.call(‘espeak ‘+text_66, shell=True)
place = input (‘Where do you come from.’)
time.sleep (1)
text_67 = ‘”I am too excited to go to “‘ + place
subprocess.call(‘espeak ‘+text_67, shell=True)
print (‘I am too excited to go to ‘ + place)
time.sleep (1)
text_68 = ‘”Do you want to ask me anything Yes or no”‘
subprocess.call(‘espeak ‘+text_68, shell=True)
question = input (‘Do you want to ask me any thing Yes or No?’)
choice1 = input
if question == ‘Yes’:
text_69 = ‘”Your options are : 7. Who are you? 8. Where do you come from”‘
subprocess.call(‘espeak ‘+text_69, shell=True)
choice2 = input(‘Your options are : 7. Who are you? 8. Where do you come from?’)
else:
text_70 = ‘”Goodbye’+ name
subprocess.call(‘espeak ‘+text_70, shell=True)
print (‘Goodbye ‘ +name)

if choice2 == ‘7’:
text_71 = ‘”I am Clever Computer designed to be interactive, you are ‘ + name +’ and you are ‘+ age +’ years               old”‘
subprocess.call(‘espeak ‘+text_71, shell=True)
print (‘I am Clever Computer designed to be interactive, you are ‘ + name + ‘ and you are ‘ + age +’ years old’)
time.sleep(2.5)
text_72 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_72, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_73 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye”‘
subprocess.call(‘espeak ‘+text_73, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

if choice2 == ‘8’:
text_74 = ‘”I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all                 like coding”‘
subprocess.call(‘espeak ‘+text_74, shell=True)
print (‘I come from England, you come from ‘ + place +’ you like ‘ + hobby +’ where I come from we all like                   coding’)
time.sleep(2.5)
text_75 = ‘”I am designed to talk, what do you want to talk about”‘
subprocess.call(‘espeak ‘+text_75, shell=True)
chat = input(‘I am designed to talk, what do you want to talk about?’)
time.sleep(1)
text_76 = ‘”I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!”‘
subprocess.call(‘espeak ‘+text_76, shell=True)
print(‘I do not want to talk about ‘ + chat + ‘ I have better things to do goodbye!’)

#Made by PythonStar