Answer to Question #323736 in Python for ttiandarfa

Question #323736

Complete the following print and if statements by accessing the appropriate elements from my_list. Hint: Use the list indexing notation []. print('My favorite color is', ???) print('I have {} pet(s).'.format(???)) if ???: print("I have previous programming experience") else: print("I do not have previous programming experience")


1
Expert's answer
2022-04-05T09:30:03-0400
my_list = ['black',5,'Python']


print("My favorite color is "+my_list[0])
print('I have {} pet(s).'.format(my_list[1]))


if 'Python' in my_list:
    print("I have previous programming experience")
else:
    print("I do not have previous programming experience")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS