Code:
for numE in [2, 6]:
for numF in [3, 5]:
print(numE, numF)
Explanation:
Since the first number of the first output is 2, the outer loop must contain the list [2, 6], meaning 'for numE in [2, 6]:' is on line 1. This leaves us with 'for numF in list [3, 5]:' as the nested loop (line 2), and the print statement on line 3 since it needs to print both numE and numF.
Hope this helps :)
Answer:
Python 3 code used below
Explanation:
def word_extraction(sentence,letter)
//splitting the sentence into individual words
words=sentence.split()
for word in words:
//This will take care of the word in lower
if letter in word.lower():
return word
return ""
# Testing the function here. ignore/remove the code below if not required
print(extract_word_with_given_letter('hello HOW are you?', 'w'))
print(extract_word_with_given_letter('hello how are you?', 'w'))