Answer:
The solution code is written in Python
- def largerThanN(myList, n):
- output = ""
-
- for x in myList:
- if(x > n):
- output += str(x) + " "
-
- print(output)
-
- l = [5, 12, 11, 4, 56, 32]
- n = 15
- largerThanN(l, n)
Explanation:
Firstly, create a function largerThanN that accepts two arguments, a list (myList) and a number (n) (Line 1).
Next, create a output variable to hold the string of numbers in the list that are greater than the input number n (Line 2).
Create a for loop to traverse through each number in the list and then check if the current x is bigger than n. If so concatenate the x to output string along with a single space " " (Line 4 -6)
After the loop, print the output string (Line 8)
We test the function by using a sample list and n = 15 (Line 10 - 12). The program will display 56 32 .
Answer:
tom wants to help her
Explanation:
Tom is rushing because he is at the top of a department store and he can't get a hold of her.
Answer:
I believe it is just a task. Since there exists(on windows) the Task Manager application, where you can stop any running <em>task, </em>I think that they are called tasks
Explanation:
Answer:
Explanation:
a = input("what kind of pet the user has")
if a == 'cat':
print("Too bad")
elif a == 'dog':
print("Lucky you!")