Question: Need Help to add code that will insert a new element in the list of lists #import random module to randomly choose an option import
Need Help to add code that will insert a new element in the list of lists
#import random module to randomly choose an option
import random
#list of lists of available clothing
clothinglisthatwhite socks", "black socks"red shirt", "greenshirt"jeans "dress pants", "pajama pants"
#print the entire list
printclothinglist
#assign headwear a list within the list
headwearclothinglist
#print headwear list
printheadwear
#assign socks a list within the list
socksclothinglist
#print socks list
printsocks
#assign shirt a list within the list
shirtsclothinglist
#print shirt list
printshirts
#assign pants a list within the list
pantsclothinglist
#print pants list
printpants
#randomly choose a sock color
sockchoicerandom.choicesocks
#randomly choose a shirt color
shirtchoicerandom.choiceshirts
#randomly choose a pants option
pantschoicerandom.choicepants
#print a chosen outfit
printheadwear sockchoice,shirtchoice, pantschoiceNe
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
