﻿ 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… - Essay solutions

## 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

### Related Post

Download the 2019 Annual Report for lululemon athletica inc…. Download the 2019 Annual Report for lululemon athletica inc. from https://investor.lululemon.com/static-files/8df91f4d-25a1-4e69-8b94-606f9c370440 and calculate the company’s inventory turnover for the period from Feb. 3,