Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

whin LAB 5 Q . REMARKS, REMARKS, REMARKS, add them ! You can use only material from the book spanning chapters 1 to 6 .

whin
LAB 5
Q. REMARKS, REMARKS, REMARKS, add them !
You can use only material from the book spanning chapters 1 to 6. Don't get creative by borrowing from the web.
Don't do things manually, use lists, sets, dictionar1es, var1ables etc. and
work on them using the built in functions, methods, etc. that we cover in chapters 1 to 6.
If a print statement is needed for a part, start the block with a new line, put a title line, then print whatever is asked. Make your print output readable. We will thke points off for messy outputs
If something is not clear, if something is inconsistent, ASK to clarify and get extra points.
4 INPUTS
frstName =('Alan', 'Roger', 'Roger', 'Alan', 'William', 'Brendon', 'Donald')
lastName =('Alders', 'Cash', 'Manz', 'Manz', 'Cash', 'Picker',
'Parsley', 'Norman')
states =('Alaska', 'Colorado', 'Maryland', 'Pennsylvan1a', 'Nevada',
'Alaska', 'Mich1gan', 'Texas')
1ncome =(80500,111243,32000,254000,0,45234,100,76239)
# PART1 : add missing first or last name
# If there is an extra last name, the first name that goes with it is chris.
# If there is an extra first name, the last name that goes with it is 'Johnson'
# Add missing name, print the person's first and last name, don't forget to use a tit le-block
# PART 2: Make all first and last names of the same length (string var1ables of same length) by adding trailing white spaces
# Add trailing white spaces to frst and last names so that they all have the same length
# PART 3: create a dictionary for each person with the following keys: first name, last name, income, state.
# The state of a person is the state that starts with the first letter of the last
name of that person
# Add the dictionary for each person to a list called people>
"print the first name, Last name, income and state of each person, for all
4 use f-strings
# Typical line for a person : "Ridvan Akkurk from Colorado"
# PART4: Delete the var1ables sstates and cincomes
# Use the built-in function to verify that =dir()
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions