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, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
Computers and Technology, 23.06.2019 16:00
Kenny works with an it company. his company is about to launch new software in the market. he has to ensure that this new software is functional and meets all of the quality standards set up at the planning stage. which job profile is kenny likely to have? kenny is likely to have the job profile of a blank .
Answers: 2
Chemistry, 25.08.2019 19:30
English, 25.08.2019 19:30
Biology, 25.08.2019 19:30
Social Studies, 25.08.2019 19:30
History, 25.08.2019 19:30
Physics, 25.08.2019 19:30
Mathematics, 25.08.2019 19:30
History, 25.08.2019 19:30
English, 25.08.2019 19:30
Mathematics, 25.08.2019 19:30
Mathematics, 25.08.2019 19:30