
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
This should be in Python
Here is a pastebin link to all the students info and names -> https://pastebin.com/su38xFbQ
![Task 3- Student Information Unpacking (Topics: Nested collections, flow-control, multi-file, strings)
Requires: utilities.py -> variables students and studentsInfo
Task 3 is to print out a list of students and their information. This information is stored in two variables (a list and a
dictionary of lists). The data is organized as shown in the diagram below. Specifically, the variable students is a list 47
strings of student names; the variable studentsInfo is a dictionary where the keys indicate information about the
students. Each key is associated with a list of integers that indexes into the students list variable.
The keys in the dictionary indicate the following information: 'Year 1' to 'Year 4' is what year a student is
studying. For example, 'Sasha' is a 'Year 2' student (see below). Keys 'CS', 'DM','BZ','SE' indicate the
students' program of study (e.g., 'CS' is comp sci, 'DM' is digital media, 'BZ' is business, and ' SE' is software
engineering). For example, 'Solar' is a 'CS' student. Keys 'On Campus ' and 'Off Campus' indicate the
students' living arrangements. For example, 'Mahmoud' lives 'On Campus'.
index
1
2
3
4
45
46
students - ['Juhong', 'Sasha', 'Solar', 'Ali', 'Amy', 'Gopi', ., 'Mahmoud', 'Rutha']
studentsInfo = {
'Year 1': [42, 24, 12, 37, 35, 23, 32, 5, 34, 19],
'Year 2': [1, 28, 36, 46, 30, 15, 6, 33, 13, 7, 18, 44],
"Year 3': [26, 11, 21, 3, 2, 14, 31, 27],
'Year 4': [25, 4, 20, e, 16, 17, 40, 39, 29, 22, 41, 9, 8, 10, 38, 43, 45],
'cs': [24, 1, 33, 12, 2, 30, 23, 34, 3, 45, 6, 22, 39, 11, 14, 28, 15, 26, 21, 7],
'DM': [44, 18, 16, 40, 29, 13, 46],
"BZ': [10, 5, 9, 31, 41, 20, 8, 25, 17, 42, 35, 43, 38, e],
"SE': [4, 19, 27, 32, 36, 37],
"On Campus': [24, 13, 6, 3, 22, 4, 23, 12, 15,
'off Campus': [30, 1, 37, 36, 41, 16, 9, 25, 29, 17, e, 18, 31, 44, 5, 32, 2, 20, 28]
33, 40, 43, 35, 8, 45],
***
Task 3 should behave as follows:
1) Use the two variables above to print out each student's information sorted by the student's name (see below).
2) Format the output for each student as follows:
Vladen (Year 3) Program: CS Housing: On Campus
ΛΛΛΛΛΛΛΛΛ
There should be ten characters for each name. If a name has less than ten characters, you'll need to pad it with leading
spaces. Using ten characters for the name ensures the final output of each student aligns, as shown below.
Example of task 3 running -- see video link to see an example of the full list of names being printed.
Abisai (Year 4) Program: BZ Housing: On Campus
Ajay (Year 2) Program: SE Housing: Off Campus
Alexi (Year 4) Program: DM Housing: On Campus
Ali (Year 3) Program: CS Housing: On Campus
Amy (Year 4) Program: SE Housing: On Campus
..
Ursula (Year 2) Program: CS Housing: Off Campus
Vladen (Year 3) Program: CS Housing: On Campus
Wen (Year 1) Program: SE Housing: Off Campus
Program: CS Housing: On Campus
Weng-Fai (Year
Yasu (Year 4) Program: CS Housing: On Campus
Yuki (Year 4) Program: BZ Housing: On Campus
Yunjo (Year 2) Program: DM Housing: Off Campus](https://content.bartleby.com/qna-images/question/beb43acd-4bfb-4c49-84a8-7d6db7b72498/53c47e03-ba7e-4f8d-b4fe-b2b98c636312/1wfe47_thumbnail.png)
Transcribed Image Text:Task 3- Student Information Unpacking (Topics: Nested collections, flow-control, multi-file, strings)
Requires: utilities.py -> variables students and studentsInfo
Task 3 is to print out a list of students and their information. This information is stored in two variables (a list and a
dictionary of lists). The data is organized as shown in the diagram below. Specifically, the variable students is a list 47
strings of student names; the variable studentsInfo is a dictionary where the keys indicate information about the
students. Each key is associated with a list of integers that indexes into the students list variable.
The keys in the dictionary indicate the following information: 'Year 1' to 'Year 4' is what year a student is
studying. For example, 'Sasha' is a 'Year 2' student (see below). Keys 'CS', 'DM','BZ','SE' indicate the
students' program of study (e.g., 'CS' is comp sci, 'DM' is digital media, 'BZ' is business, and ' SE' is software
engineering). For example, 'Solar' is a 'CS' student. Keys 'On Campus ' and 'Off Campus' indicate the
students' living arrangements. For example, 'Mahmoud' lives 'On Campus'.
index
1
2
3
4
45
46
students - ['Juhong', 'Sasha', 'Solar', 'Ali', 'Amy', 'Gopi', ., 'Mahmoud', 'Rutha']
studentsInfo = {
'Year 1': [42, 24, 12, 37, 35, 23, 32, 5, 34, 19],
'Year 2': [1, 28, 36, 46, 30, 15, 6, 33, 13, 7, 18, 44],
"Year 3': [26, 11, 21, 3, 2, 14, 31, 27],
'Year 4': [25, 4, 20, e, 16, 17, 40, 39, 29, 22, 41, 9, 8, 10, 38, 43, 45],
'cs': [24, 1, 33, 12, 2, 30, 23, 34, 3, 45, 6, 22, 39, 11, 14, 28, 15, 26, 21, 7],
'DM': [44, 18, 16, 40, 29, 13, 46],
"BZ': [10, 5, 9, 31, 41, 20, 8, 25, 17, 42, 35, 43, 38, e],
"SE': [4, 19, 27, 32, 36, 37],
"On Campus': [24, 13, 6, 3, 22, 4, 23, 12, 15,
'off Campus': [30, 1, 37, 36, 41, 16, 9, 25, 29, 17, e, 18, 31, 44, 5, 32, 2, 20, 28]
33, 40, 43, 35, 8, 45],
***
Task 3 should behave as follows:
1) Use the two variables above to print out each student's information sorted by the student's name (see below).
2) Format the output for each student as follows:
Vladen (Year 3) Program: CS Housing: On Campus
ΛΛΛΛΛΛΛΛΛ
There should be ten characters for each name. If a name has less than ten characters, you'll need to pad it with leading
spaces. Using ten characters for the name ensures the final output of each student aligns, as shown below.
Example of task 3 running -- see video link to see an example of the full list of names being printed.
Abisai (Year 4) Program: BZ Housing: On Campus
Ajay (Year 2) Program: SE Housing: Off Campus
Alexi (Year 4) Program: DM Housing: On Campus
Ali (Year 3) Program: CS Housing: On Campus
Amy (Year 4) Program: SE Housing: On Campus
..
Ursula (Year 2) Program: CS Housing: Off Campus
Vladen (Year 3) Program: CS Housing: On Campus
Wen (Year 1) Program: SE Housing: Off Campus
Program: CS Housing: On Campus
Weng-Fai (Year
Yasu (Year 4) Program: CS Housing: On Campus
Yuki (Year 4) Program: BZ Housing: On Campus
Yunjo (Year 2) Program: DM Housing: Off Campus
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 6 steps with 5 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Horse with columns: ID - primary key RegisteredName Breed Height BirthDate Student with columns: ID - primary key FirstName LastName Street City State Zip Phone EmailAddress LessonSchedule with columns: HorseID - partial primary key, foreign key references Horse(ID) StudentID - foreign key references Student(ID) LessonDateTime - partial primary key Write a SELECT statement to create a lesson sarrow_forwardWhat are some pros and cons of inline form validation? Please be as detailed as possible.arrow_forwardires = 0; for indexl = 10:-2:1 for index2 = 2:2:index1 if index2 == 6 break end ires = ires + index23; end end ires = number of times (outer loop) number of times (inner loop)arrow_forward
- An index may speed up queries, but it's usually a terrible idea to create an index for every property or combination of properties that might be used as search keys. I'd want to know more about this.arrow_forwardhow to write "List the job titles that end with the letter "t” in MySQLarrow_forwardCreate a formula that provides the start date of a project as follows: In cell H4, begin to enter a formula using the INDEX Use the Lookup table (range A2:E23) as the array. For the row_num argument, use the MATCH Use the Project ID (cell H2) as the lookup_value for the MATCH function. Use the ID column (range A2:A23) as the lookup_array for the MATCH function. Specify an exact match (0) for the MATCH function. Use the Start Date column (column 4) as the column_num for the INDEX function.arrow_forward
- Task 4: The InstantRide User Satisfaction team is a core team for InstantRide, and they focus on increasing the customer satisfaction. They want to learn the travel time for each ride in the system. You need to return the USER_ID, and the TRAVEL_TIME column which is calculated using the TIMEDIFF function on the TRAVEL_END_TIME and the TRAVEL_START_TIME.arrow_forwardFor this portion of the lab design the solution in the following manner: Create a table using a two-dimensional list that stores a Fahrenheit temperature and the equivalent Celsius temperature. Use the following range of Fahrenheit temperatures:Starting at -10 through 100 in increments of 10. Thus, the Fahrenheit temperatures will be:-10, 0, 10, 20, 30, 40, 50…and so on.Display the contents of the list.Similarly create tables/lists for the following, starting at 0 through 100 in increments of 10:Miles to kilometersGallons to litersPounds to kilogramsInches to centimetersDisplay the contents of each listSave the program as firstname_lastname_Lab7a.py where you will replace firstname and lastname with your actual first and last name.arrow_forwardArticle Link: https://www.mdpi.com/2304-6740/11/2/65Write a summary about the article - Summarize the main idea/point(s) - Please include excerpts from the article to emphasize a point, but it must be cited as an in-text citation. E.g. "Quote." (Author's lat name page) For example, (John 6)arrow_forward
- A wavy line will appear at the cursor's current position in the code editor.arrow_forward2-List the course number and description of courses where in students have received grades for every one of the possible grade types offered in the course. Order by course number.4- List course number and description all of the Java courses and the total number of enrollments for each course. Arrange by course number. Show zero for courses with no students enrolled.5-List student ID and Name of all of the students in area code 617 along with the number of enrollments each has. If the students has not enrolled in any courses, display the word “none” in the enrollments column.Alphabetize the list on last name and first name.arrow_forwardTest Methods for Software Where do you draw the line while doing domain testing? Please provide a succinct summary of each.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education