Saturday, March 24, 2012

Madlib continue

Well I learned that the open('nameofthefile.tpl', 'r').read() can be used to open the story you have in a different file, this made everything much easier for me and for everyone in class. We can now style the pages to your own liking.

It does not necessarily have to end in .tpl it can be anything suck as .html but I find it more helpful to save it as that.

Wednesday, March 21, 2012

MadLib

Managed to create a madlib, but wanted to take it to the next level. Created a login page. That gives me an idea.....

Sunday, March 18, 2012

Designing a ToDo List Web Application

I was thinking in creating a login page, after you put your username and password it would take you to this other page where there would be a daily routine you will have to follow, starting from morning all the way to night time, they will be checkboxes so there will be more options to choose from. There will be a reset and submit button.

To view an example of the login click here.
To view an example of the ToDo list click here.

Wednesday, February 15, 2012

Python


info = []

info.append(input("Please enter your first name: "))
info.append(input("Please enter your last name: "))
info.append(input("Please enter your phone number: "))
info.append(input("Please enter your email: "))

contact = repr(info)

try:
f = open('contact_list.dat', 'a')
except:
f = open('contact_list.dat', 'w')

f.write(contact + "\n")
f.close()


We start with an empty list called info.
Then we store their info and turn it into a string using repr.
We create a file with the name contact_list.dat and the a (append)stores and makes it able to write more info in there after the program has been already created.