7a. Implement the following: a) Use a for loop to create a list with 26 letters (a-z). b) Use a for loop to create a list with 26 numbers from 1 to 26 inclusive. c) Create a dictionary, charNum by zipping above two lists. d) Use a for loop to print the keys and values in the dictionary as the output below. Example Output: a 1|b 2|c 3|d 4|e 5|f 6|g 7|h 8|i 9|j 10|k 11|1 12|m 13|n 14|o 15|p 16|q 17|r 18|5 19|t 20|u 21|v 22|w 23|x 24|y 25|z 26||

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
Question

need help with python...paste indented code plzz

 

7a. Implement the following:
a) Use a for loop to create a list with 26 letters (a-z).
b) Use a for loop to create a list with 26 numbers from 1 to 26 inclusive.
c) Create a dictionary, charNum by zipping above two lists.
d) Use a for loop to print the keys and values in the dictionary as the output below.
Example Output:
a 1|b 2|c 3|d 4|e 5|f 6|g 7|h 8|i 9|j 10|k 11|1 12|m 13|n 14|o 15|p 16|q 17|r 18|s 19|t 20|u 21|v 22|w 23|x 24|y 25|z 26|
7b. Implement the following:
a) Use a for loop to create a list with 26 letters (A-Z).
b) Use a for loop to create a list with 26 numbers from 100 to 2600 (with step value of 100) inclusive.
c) Create a dictionary, numChar by zipping above two lists.
d) Use a for loop to print the keys and values in the dictionary as the output below.
e) Merge the dictionary, charNum created in 7a with the dictionary, numChar into one dictionary, all.
f) Print out the dictionary, all as the output below.
Example Output:
100 A| 200 B|30e c[400 D|500 E|600 F|700 G||
12100 u|2200 v|2300 w|2400 X|2500 Y|2600 z||
{'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11,
1800: 'R', 1900: 's', 2000: 'T', 2100: 'U', 2200: 'V', 2300: 'W', 2400: 'X', 2500: 'Y', 2600: 'z'}
Transcribed Image Text:7a. Implement the following: a) Use a for loop to create a list with 26 letters (a-z). b) Use a for loop to create a list with 26 numbers from 1 to 26 inclusive. c) Create a dictionary, charNum by zipping above two lists. d) Use a for loop to print the keys and values in the dictionary as the output below. Example Output: a 1|b 2|c 3|d 4|e 5|f 6|g 7|h 8|i 9|j 10|k 11|1 12|m 13|n 14|o 15|p 16|q 17|r 18|s 19|t 20|u 21|v 22|w 23|x 24|y 25|z 26| 7b. Implement the following: a) Use a for loop to create a list with 26 letters (A-Z). b) Use a for loop to create a list with 26 numbers from 100 to 2600 (with step value of 100) inclusive. c) Create a dictionary, numChar by zipping above two lists. d) Use a for loop to print the keys and values in the dictionary as the output below. e) Merge the dictionary, charNum created in 7a with the dictionary, numChar into one dictionary, all. f) Print out the dictionary, all as the output below. Example Output: 100 A| 200 B|30e c[400 D|500 E|600 F|700 G|| 12100 u|2200 v|2300 w|2400 X|2500 Y|2600 z|| {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 1800: 'R', 1900: 's', 2000: 'T', 2100: 'U', 2200: 'V', 2300: 'W', 2400: 'X', 2500: 'Y', 2600: 'z'}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Linked List Representation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning