Jump to content

rsvp program to show guests attending Shannon wedding


G+_egbie anderson
 Share

Recommended Posts

 rsvp program to show guests attending Shannon wedding.

 

 

So after watching the episode 17 of coding 101 where Shannon asked us to fix a certain part of her code. Father Padre then asks us to add a little something something  to the code a menu.

 

So that exactly what I have done. I have created a file called rsvp.txt which holds all the data related to Shannon wedding. The data is in the form of which is the way Shannon implemented it.

It uses that file as a pivot point to display the people, attending or not yet replied to the wedding. The user of the program can also add names to file.

 

 

The main program file is called wedding_rsvp.py but it has dependences on two extra files that I  created called create_data.py and error.py. The main program wedding_rspv.py must exists in the same directory or python will complain. Lucky for me git hub to the rescue which has a specific option 'download as zip'.  This is one of the reason I did not paste on pastebin.

 

When downloaded unzip the directory where all the files are located within the same directory. There are three python programs and one text file. The main program to run is the wedding_rspv.py file. There is also a rspv.txt file that I included but that does not really matter because you can use your own file with a different set of names. Providing the data in the file is in the form and that is called rsvp.txt and it exists in directory containing the wedding_rspv.py file. Then everything should run smoothly.

 

Okay so it about time I stop typing and pointed you to were you can find my code.

 

Hope you have as much fun tampering with as I had write it.

 

So have fun with the program break make it better, tweak  it. Let me know if you find any errors.

 

Ps

will not work if you using python 3

https://github.com/EgbieAnderson1/coding101_projects

Link to comment
Share on other sites

Updated version of rsvp program

 

I have added one new function in the error class now each time an error occurs such as an incorrect data format or no rspv.txt file. A log file is created on the user current working directory stating what the error was and what time it occurred.

 

While I was act it I have also refactored the wedding_rspv.py program by refactoring certain methods such as a print statement that asks the user for their name and surname in three different places. I have moved that into a separate function now the add guest function and lookup guest and any module that requires the user to input a first name and surname can use the same method, thus eliminating the need for individual print statement asking for the users name. 

 

 That is some of the changes I have made.

 

 

Like Father padre says once you have created your program you can go back and tweak it or add more stuff.

 

The circle of life

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...