I need help fixing my code for Syntax errors in Python.
def display_larger(numberList, num):
...
Computers and Technology, 11.04.2021 09:30, kell22wolf
I need help fixing my code for Syntax errors in Python.
def display_larger(numberList, num):
greaterList=[]
for i in range(len(numberList)):
if numberList[i] > num:
greaterList. append(numberList[i])
return greaterList
def main():
print("\nEnter a list of 10 integers:")
numberList = []
for i in range(0, 10):
print("Enter number a number: ")
item = int(input())
numberList. append(item)
return numberList
if __name__ == "__main__":
numberList=main()
num=int(input("Enter the number you wish to test if the list elements are greater than: "))
print("Number: ",num)
print("List of numbers:\n",numberList)
newList=display_larger(numberList, num)
print("List of numbers that are larger than ",num)
print(newList)
Answers: 3
Computers and Technology, 23.06.2019 09:30, rscvsdfsrysas3712
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
Computers and Technology, 23.06.2019 10:30, badpotterchris
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
Computers and Technology, 23.06.2019 18:40, brooklyn4932
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
Computers and Technology, 24.06.2019 17:50, yssbammy
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
History, 08.04.2021 18:10
Social Studies, 08.04.2021 18:10
Mathematics, 08.04.2021 18:10