Computer Science, asked by 4804176334, 10 months ago

Python: high school assignment, please keep simple In python:
Instructions Use the following initializer list:

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

Create a second array named s that stores the lengths of each word in the array above. Then, print—on separate lines—each word by printing the length of the word and then the word. Follow the same format as the sample run below. Sample Run:

9: Algorithm
5: Logic
6: Filter
8: Software
7: Network
10: Parameters
7: Analyze
9: Algorithm
13: Functionality
7: Viruses

Answers

Answered by jai696
1

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

s = [len(word) for word in w]

print("\n".join([f"{str(item[0])}: {item[1]}" for item in zip(s, w)]))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by gkhanaf
0

Answer:

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

s = [len(word) for word in w]

print("\n".join([str(item[0]) + f": {item[1]}" for item in zip(s, w)]))

Explanation:

Similar questions