python homework

profileHashim-love1
untitled_message.zip

Boys.txt

Aaron 7118
Adam 5176
Adrian 6303
Aiden 12158
Alexander 13321
Andrew 9324
Angel 5523
Anthony 9815
Asher 5466
Austin 5334
Ayden 4472
Benjamin 14569
Bentley 4026
Brandon 4076
Brayden 5679
Bryson 4333
Caleb 7914
Cameron 6807
Carson 4892
Carter 10134
Charles 7050
Chase 4826
Christian 7584
Christopher 9020
Colton 5580
Connor 6983
Cooper 4951
Daniel 12839
David 11028
Dominic 5394
Dylan 9657
Easton 5606
Eli 7046
Elias 4454
Elijah 13764
Ethan 13758
Evan 5576
Ezra 4830
Gabriel 10142
Gavin 4913
Grayson 8622
Greyson 4295
Henry 10323
Hudson 6098
Hunter 7613
Ian 5048
Isaac 9671
Isaiah 7454
Jace 5169
Jack 8367
Jackson 11210
Jacob 14416
James 14776
Jason 4851
Jaxon 8054
Jaxson 4868
Jayden 10063
Jeremiah 6546
John 9952
Jonathan 6914
Jordan 5589
Jose 5089
Joseph 10823
Joshua 9138
Josiah 6928
Julian 8333
Kevin 4526
Landon 6987
Leo 5260
Leonardo 4310
Levi 8009
Liam 18138
Lincoln 7076
Logan 11200
Lucas 12838
Luke 9930
Mason 15192
Mateo 6526
Matthew 12551
Michael 13998
Nathan 7933
Nicholas 5716
Noah 19015
Nolan 5615
Oliver 12975
Owen 10249
Parker 4685
Robert 5953
Roman 4187
Ryan 8215
Samuel 10492
Sawyer 4213
Sebastian 10249
Theodore 4859
Thomas 7309
Tyler 4474
William 15668
Wyatt 9514
Xavier 4560
Zachary 4516

Courses.py

def createDictionaries(): rooms = {"CS101":3004, "CS102":4501, "CS103":6755, "NT110":1244, "CM241": 1411} instructors = {"CS101":"Haynes", "CS102":"Alvarado", "CS103": "Rich", "NT110":"Burke", "CM241": "Lee"} times = {"CS101":"8:00 a.m.", "CS102":"9:00 a.m.", "CS103":"10:00 a.m.", "NT110":"11:00 a.m.", "CM241": "1:00 p.m."} return rooms, instructors, times def menu(): print("Course Information") print("1. Display information for a course") print("2. Add a new course") print("3. Delete a course") print("4. Change course information") print("5. Quit") selection = input("Enter your choice: ") print() return selection def courseInfo(rooms, instructors, times): course = input("Enter a course number: ") if course not in rooms: print(course, "is an invalid course number.") else: print("The details for course", course, "are:") print("Room:", rooms[course]) print("Instructor:", instructors[course]) print("Time:", times[course]) print() def addCourse(rooms, instructors, times): course = input("What is the new course? ") if course in rooms: print("Cannot add, course already exists.") else: room = int(input("Enter room number: ")) instructor = input("Enter the instructor: ") time = input("Enter the time: ") rooms[course] = room instructors[course] = instructor times[course] = time def deleteCourse(rooms, instructors, times): course = input("Enter the course you want to delete: ") if course in rooms: print("Course Deleted") rooms.pop(course, "Course does not exist") instructors.pop(course, "Course does not exist") times.pop(course, "Course does not exist") def changeInfo(rooms, instructors, times): course = input("Enter course to change: ") change = input("What to change: (R)oom, (I)ntructor, (T)ime ") value = input("Enter new value ") if change == "R": rooms[course] = int(value) elif change == "I": instructors[course] = value else: times[course] = value def main(): rooms, instructors, times = createDictionaries() selection = menu() while selection != "5": if selection == "1": courseInfo(rooms, instructors, times) elif selection == "2": addCourse(rooms, instructors, times) elif selection == "3": deleteCourse(rooms, instructors, times) elif selection == "4": changeInfo(rooms, instructors, times) selection = menu() main()

Girls.txt

Aaliyah 4611
Abigail 11699
Addison 6295
Adeline 4103
Alexa 4760
Alice 3669
Allison 4762
Amelia 10702
Anna 4749
Aria 6904
Ariana 4577
Arianna 3869
Aubree 3390
Aubrey 6507
Audrey 5330
Aurora 3963
Autumn 3990
Ava 16237
Avery 8733
Bella 3641
Brianna 3076
Brooklyn 5922
Camila 6036
Caroline 4410
Charlotte 13030
Chloe 7410
Claire 5190
Clara 3055
Cora 3350
Eleanor 5100
Elena 3168
Eliana 3185
Elizabeth 9493
Ella 7866
Ellie 5045
Emily 10926
Emma 19414
Eva 3777
Evelyn 10060
Faith 3035
Gabriella 4215
Genesis 4325
Gianna 3209
Grace 7531
Hailey 3918
Hannah 5976
Harper 10733
Hazel 4634
Isabella 14722
Julia 3310
Katherine 3259
Kaylee 3814
Kennedy 4313
Kinsley 3353
Kylie 3396
Layla 6234
Leah 5380
Lillian 6333
Lily 6558
Lucy 4568
Luna 3645
Lydia 3590
Mackenzie 3390
Madeline 3257
Madelyn 4208
Madison 8982
Maya 4055
Melanie 3473
Mia 14366
Mila 4802
Naomi 3772
Natalie 6156
Nevaeh 3756
Nora 5561
Olivia 19246
Paisley 4839
Penelope 6367
Peyton 3482
Piper 3926
Quinn 3636
Reagan 3081
Riley 7110
Ruby 3796
Sadie 4264
Samantha 4924
Sarah 4378
Savannah 5336
Scarlett 7680
Serenity 3789
Skylar 5099
Sofia 9134
Sophia 16070
Stella 4912
Taylor 3261
Victoria 7267
Violet 4837
Vivian 3124
Willow 3086
Zoe 5706
Zoey 6414

Number 01 Chapter -02.docx

CS 222 01

Programming Assignment 01

20 Points

Due: Wednesday, September 6, 2017 at the beginning of class

Located on the Instructor drive in the I:\kopp\outbox\CS 222 01\Program Assignments folder are two text files: boys.txt and girls.txt. Use these files to write a program to do the following:

· Create a dictionary from the boys.txt file that uses the boys’ names as the key and the number of boys that were named that name as the value. The names and counts are delimited by a comma.

· Create a dictionary from the girls.txt file that uses the girls’ names as the key and the number of girls that were named that name as the value. The names and counts are delimited by a comma.

· Create a menu that contains the following choices:

· Add a name and count for either a boy or girl

· Delete a name and count for either a boy or girl

· Find the count for a particular boy name or girl name

· Find the boy name with the highest count

· Find the girl name with the highest count

· Quit the program

Use methods where appropriate. Use descriptive identifier names. Use comments to describe each method.

BE SURE TO USE DICTIONARIES AS THE ONLY MEANS TO COMPLETE THE MENU CHOICES. DO NOT USE LISTS OR ANY OTHER DATA TYPE OR DATA STRUCTURE TO SOLVE THIS PROBLEM.

Add the following comments to the beginning of the program.

Name: Your Name

Class and Section: CS 222 01

Assignment: Program Assignment 01

Due Date: See above

Date Turned in:

Program Description: You write a short description of what the program will do

When you complete the program, do the following.

1. Create a folder with the following name: ProgramAssignment01

2. Copy your program and all appropriate files to this folder

3. Copy the folder to your folder in the I:\kopp\inbox\CS 222 01 folder