Created
February 10, 2012 14:23
-
-
Save dulichan/1789893 to your computer and use it in GitHub Desktop.
My first Python script - Asking questions from the user...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Feb 10, 2012 | |
This module will be used to answer a set of questions and to | |
give intelligent answers | |
@author: Duli-chan | |
''' | |
import time | |
import re | |
print("We will now analyze what programming component is good for you?") | |
answers = list() | |
inputFromUser = input("Are you ready to go?") | |
def checkYes(string): | |
return re.search(string, inputFromUser, re.IGNORECASE) | |
search = checkYes("yes") or checkYes("yeah") or checkYes("yea") | |
if search: | |
questions = ["What languages do you know?", | |
"Do you like to work with CSS and JavaScript?", | |
"Is Java or Object Orientation impossible for you?", ] | |
for question in questions : | |
print(question) | |
answers.append(input()) | |
print("Thank you") | |
for count in range(0, 10): | |
print("Processing----------------********") | |
time.sleep(0.2) | |
print("We are now releasing your results") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment