def add_new_contact(self): first_name = input("Please enter contact's first name: ").lower() last_name = input("Please enter contact's last name: ").lower() email = input("Please enter contact's email address: ").lower() note = input("Please enter a note for the contact, if desired: ") if note == None: note = " " Contact.create(first_name, last_name, email, note)
def add_new_contact(self): first_name = input(('Enter First Name: ')) last_name = input(('Enter Last Name: ')) email = input(('Enter Email Address: ')) note = input(('Enter a Note: ')) # Contact.create(first_name, last_name, email, note) Contact.create(first_name=first_name, last_name=last_name, email=email, note=note)
def add_new_contact(self): # get all the required info from our user: print('Enter First Name: ') first_name = input() print('Enter Last Name: ') last_name = input() print('Enter Email Address: ') email = input() print('Enter a Note: ') note = input() # call the appropriate method from the contact class (remember we imported it?): Contact.create(first_name, last_name, email, note)
def add_new_contact(self): first_name = input("Enter Contact First Name: ") last_name = input("Enter Contact Last Name: ") email = input("Enter Contact Email: ") note = input("Enter Contact Note: ") new_contact = Contact.create(first_name, last_name, email, note) print('New Contact: Name: {} {} | Email: {} | Note: {} '.format( first_name, last_name, email, note))
def add_new_contact(self): print('\n--ADD A NEW CONTACT--') print('Please enter their first name: ') first_name = input().lower() print('Please enter their last name: ') last_name = input().lower() print('Please enter their email: ') email = input().lower() print('Any notes? ') note = input().lower() # Pet.create(owner=uncle_bob, name='Kitty', animal_type='cat') Contact.create(first_name=first_name, last_name=last_name, email=email, note=note)
def add_new_contact(self): print("Enter First Name: ") first_name = input() print("Enter Last Name: ") last_name = input() print("Enter Email Address: ") email = input() print("Enter a Note: ") note = input() Contact.create(first_name=first_name, last_name=last_name, email=email, note=note)
def add_new_contact(self): print('\n-----------------------') print("Add New Contact") print('-----------------------') print("Enter First Name: ", end='') first_name = input() print("Enter Last Name: ", end='') last_name = input() print("Enter Email Address: ", end='') email = input() print("Enter Note: ", end='') note = input() Contact.create(first_name=first_name, last_name=last_name, email=email, note=note) print("\n")
def add_new_contact(self): print("What is the first name?") new_first_name = input() print("What is the last name?") new_last_name = input() print("What is the email?") new_email = input() print("What is the note?") new_note = input() new_contact = Contact.create(new_first_name, new_last_name, new_email, new_note) print("New contact added:\n{}".format(new_contact))
def add_new_contact(self): print("Enter first name:") first_name = input() print("Enter last name:") last_name = input() print("Enter email:") email = input() print("Enter note:") note = input() new_contact = Contact.create( first_name=first_name, last_name=last_name, email=email, note=note )
def add_new_contact(self): print('Enter First Name: ') first_name = input().lower() print('Enter Last Name: ') last_name = input().lower() print('Enter Email Address: ') email = input() print('Enter a Note: ') note = input().lower() contact = Contact.create(first_name, last_name, email, note) return contact
def add_new_contact(self): # get all the required info from our user: print('Enter First Name: ') first_name = input() print('Enter Last Name: ') last_name = input() print('Enter Email Address: ') email = input() print('Enter a Note: ') note = input() contact = Contact.create(first_name=first_name, last_name=last_name, email=email, note=note)
def add_new_contact(self): # get all the required info from our user: print('Enter First Name: ', end="") first_name = input() print('Enter Last Name: ', end="") last_name = input() print('Enter Email Address: ', end="") email = input() print('Enter a Note: ', end="") note = input() contact = Contact.create(first_name=first_name, last_name=last_name, email=email, note=note) print("A new contact has been added successfully!")
def add_new_contact(self): print('Enter First Name: ') first_name = input() print('Enter Last Name: ') last_name = input() print('Enter Email Address: ') email = input() print('Enter a Note: ') note = input() # new_contact = Contact.create(first_name, last_name, email, note) new_contact = Contact.create(first_name=first_name, last_name=last_name, email=email, note=note) print(new_contact) print(Contact.contacts)
def add_new_contact(self): print('\nAdding a new contact') print('Enter the first name:') # first_name = 'John' first_name = input() print('Enter the last name:') # last_name = 'Smith' last_name = input() print('Enter the email:') # email = '*****@*****.**' email = input() print('Enter a note:') # note = 'John is a great guy!' note = input() # Contact.create(first_name, last_name, email, note) contact = Contact.create(first_name=first_name, last_name=last_name, email=email, note=note) print('New contact has been created.')
from contact import Contact # test out the Contact class contact1 = Contact.create('Betty', 'Maker', '*****@*****.**', 'Loves Pokemon') contact2 = Contact.create('Bit', 'Bot', '*****@*****.**', 'beep boop') contact3 = Contact.create('Anton', 'Moiseev', '*****@*****.**', 'Loves cats') print("All contacts:") print(contact1) print(contact2) print(contact3) print() print("Current number of contacts:") print(len(Contact.contacts)) print() print("Contacts ids:") print(contact1.id) print(contact2.id) print(contact3.id) print() print("Current list of contacts:") print(Contact.all()) print() requested_id = 3 print("Find contact with id of {}:".format(requested_id)) print(Contact.find(requested_id)) print() print("Successfully updating a contact:")
from contact import Contact from whois_info import WhoisInfo import contactparser #Disclaimer: Data presented below is randomly generated, any resemblance to a certain person or website is purely coincidental. defaultContacts = [ Contact.create(100, "Bates" , "Jackson", "+37063244674", "*****@*****.**"), Contact.create(101, "Tyrone" , "Parker", "+37065472003", "*****@*****.**"), Contact.create(102, "Rodney" , "Wilson", "+37063148655", "*****@*****.**"), Contact.create(103, "Luke" , "Briggs", "+37060248419", "*****@*****.**"), Contact.create(104, "Evelyn", "Despres", "+37067247967", "*****@*****.**"), Contact.create(105, "Francis", "Howard", "+37015448632", "*****@*****.**") ] defaultWhois = [ WhoisInfo.create(1, "https://www.stylesellers.net", "52.14.128.122", [defaultContacts[2], defaultContacts[4]]), WhoisInfo.create(2, "https://www.newsoutlet.com", "144.1.32.88", [defaultContacts[0]]), WhoisInfo.create(3, "https://www.networkspecialists.net", "127.0.0.1", [defaultContacts[1], defaultContacts[2], defaultContacts[5]]), WhoisInfo.create(4, "https://www.movierentals.co.uk", "11.121.13.145", [defaultContacts[0], defaultContacts[3]]), WhoisInfo.create(5, "https://www.localservers.io", "192.168.1.1", [defaultContacts[0], defaultContacts[1], defaultContacts[3]]) ] def load(): for contact in defaultContacts: contactparser.add_contact(contact) return defaultWhois