8.7 Code Practice Question 3

One latest schools question and answer enquired students to claim what they assume is the most crucial important thing for a student to do in order for you to obtain success. Of the numerous results, the one that that stood out was practice. People who are definitely successful do not become successful by being born. They work hard and persistence their lives to succeeding. If you want to accomplish your goals, keep this in mind! following some question and answer examples that you could possibly work with to develop your knowledge and gain insight that will guide you to preserve your school studies.


8.7 Code Practice Question 3

Use the following initializer list:
w = [“Algorithm”, “Logic”, “Filter”, “Software”, “Network”, “Parameters”, “Analyze”, “Algorithm”, “Functionality”, “Viruses”] Create a second array named s. Then, using a loop, store the lengths of each word in the array above. In a separate for loop, print on separate lines the length of the word followed by the word


The for loop that can be used to loop through the array s and get the length and the word is a follows:

s = [“Algorithm”, “Logic”, “Filter”, “Software”, “Network”, “Parameters”, “Analyze”, “Algorithm”, “Functionality”, “Viruses”]

for i in s:

   print(len(i), “:”, i)

The variable s is used to store the array of strings

The for loop is used to loop through the array .

The length of each string and the string is printed out.  

When the code is run, you will get exactly like the sample Run.  

They can hopefully guide the student deal with the question by make use of the questions and answer examples. Then will possibly have some sharing in a group discussion and also learning with the classmate about the topic, so another student also own some enlightenment and still keeps up the school learning.

READ MORE  What is the length is PR? ____ units Triangle angles 5n and 32+ n 40 units

Leave a Reply

Your email address will not be published.