221k views
5 votes
Edhesive 8.7

Use the following initializer list:
w = ["Algorithm", "Logic", "Filter" "Software"
"Network", "Parameters" "Analyze", "Algorithm", "Functionality", "Viruses"]

Write a loop to print the words that start with "A"

1 Answer

1 vote

w = ["Algorithm", "Logic", "Filter" "Software"

"Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

for x in w:

if x[0] == "A":

print(x)

We check to see if a word begins with "A" and if it does, we print it to the console.

User Nathan Bell
by
5.2k points