Question

In: Computer Science

ET574 Dictionary (Chapter 6) 1) Create a dictionary containing the following pieces of information about a...

ET574 Dictionary (Chapter 6)

1) Create a dictionary containing the following pieces of information about a student:
Her name is Emmylou; She is on track to graduate in Fall 2021; Her bill is paid; Her major is Archeology; She belongs to these school clubs – Photography, Acting and Glee

(Your job as the programmer is to choose the best data type as well as any key names you will use within the program)

2) Do the same for another student:
His name is Javier; He is on track to graduate in Spring 2021; His bill is unpaid; His major is Math; He belongs to these school clubs – Archery and Acting

3) Create a list whose contents is the dictionaries you created in step 1 & 2.

Solutions

Expert Solution

Solution to the above python problem is provided below, In case of any help needed regarding the solution. Feel free to write into the comment section of the Solution.

Solution:

# Main function 
def main():
    # Emmylou dictonary
    student_1_dict = {'name':'Emmyolus','graduation_period':'Fall 2021','bill_status':'paid','major_course':'Archaelogy','school_clubs':['Photography','Acting','Glee']}
    
    # Javier  dictonary 
    student_2_dict = {'name':'Javier','graduation_year':'Spring 2021','bill_status':'unpaid','major_course':'Math','school_clubs':['Archery','Acting']}
    
    # Above dictonaries keep in list
    dict_to_list = [ student_1_dict ,student_2_dict ]
"""
# this code is just for testing 
    print("Student 1 Data ",student_1_dict)
    print("Student 2 Data ",student_2_dict)
    print("Data after converting to list : ", dict_to_list)

 """
# Calling main function
main()

Explaination of Code:

Main() functional contains the code full filling the user requirements.

There are two dictionaries in main function which contains information about students named Emmylou and Javier.

In the last step the data from the dictionary is converted into list.

ScreenShot of output:

End of Solution


Related Solutions

Create two functions that you can use for a dictionary manager: 1. remove_item(dictionary,key): a function that...
Create two functions that you can use for a dictionary manager: 1. remove_item(dictionary,key): a function that removes the item with the supplied key from the dictionary, if it exits. If the input key doesn’t exist in the dictionary, print out a message saying that the new item has not been removed because there is no matching key in the dictionary. Your function should not produce a Python error if the item does not exist; 2. add_new_item(dictionary,key,value): a function that adds...
Required information Chapter 6: Applying Excel The Chapter 6 Form worksheet is to be used to...
Required information Chapter 6: Applying Excel The Chapter 6 Form worksheet is to be used to create your own worksheet version of the main example in the text. Chapter 6: Applying Excel: Exercise (Part 2 of 2) 2. In industries that process joint products, the costs of the raw materials inputs and the sales values of intermediate and final products are often volatile. Change the data area of your worksheet to match the following: Chapter 6: Applying Excel Data Exhibit...
Using python. 1. How to create a dictionary that has an integer as a key and...
Using python. 1. How to create a dictionary that has an integer as a key and a byte as a value? the dictionary keys must contain integers from 0 to 255. It should be similar to UTF-8. When we enter an integer, it should return 1 byte. 2. Create a function when a user gives 1 byte, it should return the key from the previous dictionary.
Following information use in Question NO.6 The following is the information about assets and liabilities of...
Following information use in Question NO.6 The following is the information about assets and liabilities of M/s. Hanish LLC and its partners A, B and C. They are sharing profits 9:6:3 with total capital of OMR 169,000 as on 31.3.2020. Particular OMR Particular OMR Cash             58,500 Bank Loan          52,000 Sundry Debtors             91,000 Bonds          65,000 Stock             32,500 Bills Payable        104,000 Machinery             52,000 Sundry Creditors        130,000 Land             91,000 Bank Overdraft          32,500 Furniture...
For Information Cards Part 6, create an information card for each of the following medications (8...
For Information Cards Part 6, create an information card for each of the following medications (8 total): 1.Tetracaine 2.Albuterol 3.Dantrolene sodium 4.Sodium bicarbonate 5.Vasopressin Each Pharmacology Information Card should focus on a single medication used in the surgical environment and must contain the following information: Generic name/Brand name(s) Indications and usage Classification schedule Dosage forms Adverse reactions/side effects APA formatted credible source(s)
For Information Cards Part 6, create an information card for each of the following medications (8...
For Information Cards Part 6, create an information card for each of the following medications (8 total): Naloxone Lidocaine Bupivacaine Tetracaine Albuterol Dantrolene sodium Sodium bicarbonate Vasopressin Each Pharmacology Information Card should focus on a single medication used in the surgical environment and must contain the following information: Generic name/Brand name(s) Indications and usage Classification schedule Dosage forms Adverse reactions/side effects APA formatted credible source(s)
Create a Web page about yourself containing the following: Notepad++ The page should have a light...
Create a Web page about yourself containing the following: Notepad++ The page should have a light green background and a one inch margin. The Web page should contain: At least three headings, h1 to h3. At least two paragraphs about you. A numbered list with at least three hyperlinks. The hyperlinks cannot be the ones we created in class today which were the links to Yahoo and Google. Two horizontal rules. All the h1, h2, and h3 tags should have...
What six (6) pieces of information should be contained on the Tax Invoice for VAT Purposes...
What six (6) pieces of information should be contained on the Tax Invoice for VAT Purposes and why do you think it is included.     Taxation (100 words)
Using C# Create a class called Artist that contains 4 pieces of information as instance variables:...
Using C# Create a class called Artist that contains 4 pieces of information as instance variables: name (datatype string), specialization – i.e., music, pottery, literature, paintings (datatype string), number of art items (datatype int), country of birth (datatype string). Create a constructor that initializes the 4 instance variables. The Artist class must contain a property for each instance variable with get and set accessors. The property for number should verify that the Artist contributions is greater than zero. If a...
Information Use the following information about Rex Inc. for problems 1-6. Common stock: 100,000 shares outstanding....
Information Use the following information about Rex Inc. for problems 1-6. Common stock: 100,000 shares outstanding. $50 per share, beta=1.5 Bonds: 2,000 bonds outstanding, $1,000 face value each, 4% coupon paid semiannually, 21 years to maturity, market price of $995 per bond. Market risk premium=5%, yield on 30 day Treasury Bill= 1%, effective tax rate = 21% A) What is Rex Inc's Weight of Debt? B) What is Rex Inc's Weight of Equity? C) What is Rex Inc's Before Tax...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT