21 BREAKOUT ROOM ACTIVITY LAB: A list and dictionary for number conversion Note: If you are unable to attend lab, this lab activity can be done on…

  

3.21 BREAKOUT ROOM ACTIVITY LAB: A list and dictionary for number conversion Note: If you are unable to attend lab, this lab activity can be done on your own. Remember, it is a required lab!Create a list num_list that includes the spelled-out name of each number from 0 to 10 (inclusive of both) in English, stored in order. For example, the last element in the list should be a string literal “ten”, the penultimate element (second to last) is “nine”, etc.Create a dictionary num_dict that maps each number from 0 to 10 (inclusive of both) to its spelled-out name in English. This means that each integer value representing the number will be stored as a key and its spelled-out name will be the corresponding value.When a user inputs an integer num, output the corresponding value from num_list and num_dict, using num as an index. Assume a valid integer will be given.If input is 3, your output should be:Index value is 3List value is “three”Dictionary value is “three”This lab is intended to show you the differences in creating a list and a dictionary that hold the same values. Additionally, you will get to practice retrieving (i.e., accessing) these values and displaying them as part of your output.Important notes and terminology:When creating a list, we need to use square brackets, which are [ and ].An empty list is created by assigning [ ] to its corresponding variable name.The different values/elements in a list are separated by commas ,The first element in a list is at the position/index zero [0]When creating a dictionary, we need to use curly braces, which are { and }.An empty dictionary is created by assigning { } to its corresponding variable name.The different elements in a dictionary are stored as the key : value pairs, which are separated by commas ,The dictionary doesn’t have a built-in order of its elements, i.e., we cannot access its first element using an indexTo access a value of an element in a dictionary, we need to know its key### Replace the ellipses (…) below with your solution.# Create a list `num_list` that includes the spelled-out name of each number # from 0 to 10 (inclusive of both) in English, stored in order. For example, the last # element in the list should be “ten”, the penultimate element (second to last)  # is “nine”, etc.num_list = …# Create a dictionary `num_dict` that maps each number from 0 to 10 (inclusive of both) # to its spelled-out name in English. num_dict = …# When user inputs an integer `num`, output the value of `num_list` and `num_dict`. # Assume a valid integer will be given.num = …print(…)print(…)print(…) Computer Science Engineering & Technology Python Programming CS 8

Don't use plagiarized sources. Get Your Custom Essay on
21 BREAKOUT ROOM ACTIVITY LAB: A list and dictionary for number conversion Note: If you are unable to attend lab, this lab activity can be done on…
Just from $13/Page
Order Essay
  

Leave a Reply

Your email address will not be published.

Related Post

Answer questions 1,2,3,4 or answer questions 5,6,7,8. videos link can help : https://www.youtube.com/watch?v=hO1tzmi1V5g Answer questions 1,2,3,4 or answer questions 5,6,7,8. videos link can help : https://www.youtube.com/watch?v=hO1tzmi1V5g

  Answer questions 1,2,3,4 or answer questions 5,6,7,8. videos link can help :https://www.youtube.com/watch?v=hO1tzmi1V5ghttps://www.youtube.com/watch?v=9ovkWMI2zqA 1. According to the film:” Different but Equal” narrated by Basil Davidson: Egypt’s ancientCivilization originated in areas south of Egypt.

READ MOREREAD MORE

LESSON:GLOBAL INTERSTATE SYSTEM Select one (1) country on the list and compare it with the Philippines based on the following criteria. You can add…LESSON:GLOBAL INTERSTATE SYSTEM Select one (1) country on the list and compare it with the Philippines based on the following criteria. You can add…

  LESSON: GLOBAL INTERSTATE SYSTEM Select one (1) countryNo.         Country on the list and compare it with the Philippines based on the following criteria. You can add pictures and other supporting materials to

READ MOREREAD MORE
Open chat
💬 Need help?
Hello 👋
Can we help you?