Answer:
def select_short_strings(string_list):
new_list = []
for s in string_list:
if len(s) < 20:
new_list.append(s)
return new_list
lst = ["apple", "I am learning Python and it is fun!", "I love programming, it is easy", "orange"]
print(select_short_strings(lst))
Explanation:
- Create a function called <em>select_short_strings</em> that takes one argument <em>string_list</em>
Inside the function:
- Initialize an empty list to hold the strings that are less than 20
- Inside the loop, check the strings inside <em>string_list</em> has a length that is smaller than 20. If found one, put it to the <em>new_list</em>.
- When the loop is done, return the <em>new_list</em>
- Create a list to check and call the function
Answer: Algorithm
Explanation: An algorithm is a plan, a set of step-by-step instructions to solve a problem. it involves three basic building blocks to use when designing algorithms. these are.,
1. Sequencing
2. Selection
3. Iteration
Answer: I believe the answer is 6
Explanation: taking 35 and 65 out leaves the rest of the numbers; 15,25,45,55, and 75.
D. only the first title slide in the presentation.