B
blackneos940
Guest
I started learning python a while ago.... So far, a few months later, I can do things like THIS.....
import re
import webbrowser
new = 0
print ("Hello, and welcome to the Test Initiative...")
name = input("First, what is your name?\n>>>")
print ("Ok, got it. Your name is", name, ".")
age = input("Be HONEST, now. How old are you?\n>>>")
print ("Ah, ok. You're", age, "years old.")
interests = input("Any special interests? Hobbies?\n>>>")
print ("Ok. So your areas of interest include", interests, "...")
if 1 != 2:
book = {"dat1":"data1","dat2":"data2","dat3":"data3","dat4":"data4","dat5":"data5"}
print (book)
question = input ("Are you ready to continue? (Yes or No)\n>>>")
if question == "Yes" or question == "yes" or question == "Y" or question == "y":
print ("Ah, I see..... So you haven't lost interest yet. Let's continue.")
elif question == "No" or question == "no" or question == "N" or question == "n":
print ("What: You don't want to continue...?")
else:
print ("What? I didn't understand that. Try again.")
Earthbound = input("Have you heard of Earthbound, for the SNES?\n>>>")
if Earthbound == "Yes" or Earthbound == "yes" or Earthbound == "Y" or Earthbound == "y":
print ("Ah! So you HAVE! Here's a list of the first FOUR towns!")
list = ["Onett","Twoson","Threed","Fourside"]
print (list)
elif Earthbound == "No" or Earthbound == "no" or Earthbound == "N" or Earthbound == "n":
print("Ah, I see..... I'd explain it, but it's easier if you look it up online, or in a book somewhere...")
zipcode = r"Zip: \s*\d\d\d\d\d"
addr = "1234 Eversfield Rd, Stokesdale, N.C.\n Zip: 27284"
print (re.search(zipcode, addr))
final_question = input("Which OS (Operating System) is your favorite?\n>>>")
if final_question == "Linux" or final_question == "linux":
url = ("http://www.linux.org")
webbrowser.open(url, new = new)
elif final_question == "FreeBSD" or final_question == "freebsd" or final_question == "Free BSD" or final_question == "free bsd" or final_question == "free BSD":
url = ("http://www.freebsd.org")
elif final_question == "OSX" or final_question == "osx":
url = ("http://www.apple.com/osx")
webbrowser.open(url, new = new)
elif final_question == "Windows" or final_question == "windows":
url = ("http://windows.microsoft.com/en-US/windows/home")
webbrowser.open(url, new = new)t
print ("Bye for now! ")
Anyway, what do you think.....? It's Open Source, but I don't know why you'd wanr to adopt it..... :L
import re
import webbrowser
new = 0
print ("Hello, and welcome to the Test Initiative...")
name = input("First, what is your name?\n>>>")
print ("Ok, got it. Your name is", name, ".")
age = input("Be HONEST, now. How old are you?\n>>>")
print ("Ah, ok. You're", age, "years old.")
interests = input("Any special interests? Hobbies?\n>>>")
print ("Ok. So your areas of interest include", interests, "...")
if 1 != 2:
book = {"dat1":"data1","dat2":"data2","dat3":"data3","dat4":"data4","dat5":"data5"}
print (book)
question = input ("Are you ready to continue? (Yes or No)\n>>>")
if question == "Yes" or question == "yes" or question == "Y" or question == "y":
print ("Ah, I see..... So you haven't lost interest yet. Let's continue.")
elif question == "No" or question == "no" or question == "N" or question == "n":
print ("What: You don't want to continue...?")
else:
print ("What? I didn't understand that. Try again.")
Earthbound = input("Have you heard of Earthbound, for the SNES?\n>>>")
if Earthbound == "Yes" or Earthbound == "yes" or Earthbound == "Y" or Earthbound == "y":
print ("Ah! So you HAVE! Here's a list of the first FOUR towns!")
list = ["Onett","Twoson","Threed","Fourside"]
print (list)
elif Earthbound == "No" or Earthbound == "no" or Earthbound == "N" or Earthbound == "n":
print("Ah, I see..... I'd explain it, but it's easier if you look it up online, or in a book somewhere...")
zipcode = r"Zip: \s*\d\d\d\d\d"
addr = "1234 Eversfield Rd, Stokesdale, N.C.\n Zip: 27284"
print (re.search(zipcode, addr))
final_question = input("Which OS (Operating System) is your favorite?\n>>>")
if final_question == "Linux" or final_question == "linux":
url = ("http://www.linux.org")
webbrowser.open(url, new = new)
elif final_question == "FreeBSD" or final_question == "freebsd" or final_question == "Free BSD" or final_question == "free bsd" or final_question == "free BSD":
url = ("http://www.freebsd.org")
elif final_question == "OSX" or final_question == "osx":
url = ("http://www.apple.com/osx")
webbrowser.open(url, new = new)
elif final_question == "Windows" or final_question == "windows":
url = ("http://windows.microsoft.com/en-US/windows/home")
webbrowser.open(url, new = new)t
print ("Bye for now! ")
Anyway, what do you think.....? It's Open Source, but I don't know why you'd wanr to adopt it..... :L