Exemple #1
0
import sys
from donor_models import Donor
from donor_models import DonorCollection

donors = DonorCollection.initialize_dict({
    'William Gates, III': [653772.32, 12.17],
    'Jeff Bezos': [877.33],
    'Paul Allen': [663.23, 43.87, 1.32],
    'Mark Zuckerberg': [1663.23, 4300.87, 10432.0]
})


# Main Menu
def options_menu():
    print("\n".join(
        ("Welcome to the XYZ Charity!", "Please choose from below options:",
         "1 - Send a Thank you Note", "2 - Create a Report",
         "3 - Send Letters to All", "4 - Quit"
         ">>> ")))
    option = input('')
    return option


def quit_menu():
    print("Good bye")
    sys.exit()


# Send a Thank you note to Donor
def send_thankyou():
    donor_name = input("Enter the donor's FULL NAME "
#Mark McDuffie
#6/12/20
#Client class

import os
from donor_models import Donor
from donor_models import DonorCollection

donors = DonorCollection.initialize_dict({
    "Jim Johnson": [20000.0, 3500.0, 1600.0],
    "Mike Lee": [10000.0, 450.0, 1000.0],
    "Joe Smith": [100.0, 50.0],
    "Bob Miller": [900.0, 1200.0],
    "Steve James": [100000.0]
})


# Main Menu
def prompt():
    choice = input(
        "You have the following options: \n 1: Send a Thank You \n 2: Send Letters to all Donors "
        "\n 3: Create a Report \n 4: Quit \n")
    return choice


# Send a Thank you note to Donor
def send_thankyou():
    donor_name = input(
        "Please enter the donor's name (first, last) \nor type 'list' to see current donors \n"
    )
    while donor_name.lower() == "list":
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 22 14:00:40 2020

@author: miriam
"""

import sys
from donor_models import Donor
from donor_models import DonorCollection

donors = DonorCollection.initialize_dict({
    'Miriam Pintor': [100, 300],
    'Waleed Alvarez': [500, 200, 800],
    'Ricardo Gallegos': [50, 75, 100],
    'Dina Sayury': [125, 120],
    'Urias Gramajo': [1000]
})


# Main Menu
def options_menu():
    print("\n".join(
        ("Please choose from below options:", "1 - Send a Thank You",
         "2 - Create a Report", "3 - Send Letters to all donors", "4 - Quit"
         ">>> ")))
    option = input('')
    return option


def quit_action():