Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from datetime import datetime
- import time
- def bye():
- print("Ok, I gotta go now")
- print("It's been nice talking to you")
- print(("Bye ") + (first_name))
- q = input("Do you think i'm programmed well? : ")
- if q.lower() == "no":
- print("Oh ok")
- hy = input("Why do you think i'm programmed bad?:")
- print("Oh, thank you for your feedback")
- else:
- print("Thank you")
- print("Thanks for using Srobot")
- print("you can contact the creator at sarking.value@gmail.com")
- def robot_wait():
- input("press enter to continue..")
- def robo_speech():
- from gtts import gTTS
- import os
- from datetime import datetime
- import time
- spech = input("What do you want me to say?")
- tts = gTTS(text=spech, lang='en')
- tts.save("good.mp3")
- print("please wait.. loading")
- time.sleep(10)
- def robot_fib():
- n = input("Enter a number: ")
- a = 0
- b = 1
- fibnum = [0,1]
- count = 2
- while count < int(n):
- c = (a + b)
- count += 1
- fibnum.insert(count,c)
- a = b
- b = c
- j = 0
- for num in fibnum:
- j += 1
- print(str(j), "-> ", num)
- robot_wait()
- def robot_dice():
- import random
- print(random.randint(1,6))
- import os
- e = input("Do you want to roll again.. press 'Y' to continue: ")
- os.system('clear')
- if (e =='Y') or (e == 'y'):
- robot_dice()
- def chat():
- print("Welcome to Chat Room \n")
- robot_chat()
- def speech():
- print("Welcome to Robo Talk \n")
- robo_speech()
- robot_wait()
- def fibonaccinums():
- print("Welcome to Fibonacci Series Center \n")
- robot_fib()
- def dice():
- print("Welcome to Dice Table \n")
- robot_dice()
- def guide():
- print("Help Page: \n")
- print("1. In Speech, you enter a saying and then a robot says it")
- print("2.In Fibonnacci Numbers, you can find out numbers of fibonnacci")
- print("3.In Dice, you can generate a random number between 1 through 6")
- robot_wait()
- def exit():
- import os
- e = input("Are you sure you want to exit.. press 'Y' to exit: ")
- os.system('clear')
- if (e =='Y') or (e == 'y'):
- print("Good Bye.. exiting Robo meet., see you again")
- bye()
- quit()
- os.system("clear")
- def printOptions():
- print("Welcome to Robot Sarvesh...\n")
- print("1. Speech")
- print("2. Fibonacci Numbers")
- print("3. Dice")
- print("4. Help")
- print("5. Exit")
- def robot_main():
- import os
- os.system('clear')
- printOptions()
- argument = input("Enter your option: ")
- os.system('clear')
- if(argument == "1"):
- speech()
- elif(argument == "2"):
- fibonaccinums()
- elif(argument == "3"):
- dice()
- elif(argument == "4"):
- guide()
- elif(argument == "5"):
- exit()
- while(1):
- robot_main()
- import os
- os.system("clear")
- print("Hi, my name is Sarvesh")
- print("Nice to meet you")
- print("What's your name?")
- first_name = input("Enter your name: ")
- a2345 = input("How old are you: ")
- if a2345.lower() == "10":
- print("I'm 10 too")
- else:
- print("Oh your", a2345, ", I'm 10")
- print("how are you feeling today")
- print((first_name) + ("?"))
- happiness = input("How are you feeling today? : ")
- print("oh ok")
- reasoning = input("why? : ")
- print("Ok, let's change the topic")
- print("What do you want to talk about?")
- topic = input("What do you want to talk about? : ")
- if topic.lower() == "nothing":
- print("Oh ok")
- else:
- print(("what do you know about the ") + (topic) + ("?"))
- fact = input(("what do you know about ") + (topic) +("? : "))
- print(fact)
- print("oh that's a interesting fact.")
- realcad = "yes"
- coad = input("Do you like to code? : ")
- if (coad.lower)() == realcad:
- print("Oh, I like to code too")
- print("I think coding is fun")
- else:
- print("Well, I like to code")
- print("I think coding is fun")
- res = input("Do you think we should learn how to code? :")
- if (res.lower)() == "yes":
- rea = ("Yeah me too, but why? :")
- print(rea)
- print("Ok")
- else:
- print("oh ok")
- rea1 = ("Why not? :")
- print(rea1)
- myname = "Sarvesh"
- fsubject = input("What's your favourite subject in school? :")
- msubject = "Math"
- if (fsubject.lower)() == msubject:
- print(("oh, your favourite subject in school is ") + (fsubject) + (", my favourite subject in school is ") + (msubject) + (" too."))
- else:
- print(("oh, your favourite subject in school is ") + (fsubject) + (", my favourite subject in school is ") + (msubject))
- nnnn = input("Do you want to see my app? : ")
- if nnnn.lower() == "yes":
- robot_main()
- else:
- print("ok")
- print("Ok, I gotta go now")
- print("It's been nice talking to you")
- print(("Bye ") + (first_name))
- q = input("Do you think i'm programmed well? : ")
- if q.lower() == "no":
- print("Oh ok")
- hy = input("Why do you think i'm programmed bad?:")
- print("Oh, thank you for your feedback")
- else:
- print("Thank you")
- time.sleep(10)
- os.system("clear")
- print("Thanks for using Srobot")
- print("If you want to see more programs like this go to")
- print("sites.google.com/view/spythonprograms/home")
- print("you can contact the creator at sarking.value@gmail.com")
- time.sleep(5)
- os.system("clear")
- print("Exiting Srobot...")
- time.sleep(5)
- os.system("clear")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement