subject

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)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:40
Kali, a python programmer, is using the turtle module to write the word “hello.” which code should she use to indicate the location to begin writing the word? a # pick up the turtle and move it to its starting location. b penup(-100, 200) goto() pendown() c penup() goto(-100, 200) pendown() d # pick up the turtle and move it to (-100, 200)
Answers: 2
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
You know the right answer?
I need help fixing my code for Syntax errors in Python. def display_larger(numberList, num):
...
Questions
question
Mathematics, 24.05.2021 17:20
question
Mathematics, 24.05.2021 17:20
Questions on the website: 13722363