Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a python program and is to be only written in Python. Description: Ask a user for a number and then determine what numbers

This is a python program and is to be only written in Python.

Description:

Ask a user for a number and then determine what numbers in the list [0,1,2,3,4,5,6,7,8,9,10] are larger than the number entered by the user. Assign the number entered by the user to a variable named "n".

Details:

In a Python program, write a function named "largerThan" that accepts two arguments: a list, and a number. Call this function from a main() function. You must pass the list of numbers to the function largerThan along with the variable "n". The list should contain the numbers 0-10. The function should create a new list and add to this list any numbers that are greater than "n". The largerThan function should then display all of the numbers. At the end of the largerThan function, have a return statement that sends back the string "Done". In the main() function, print out the string sent back from the largerThan function using print().

image text in transcribed

Description: Ask a user for a number and then determine what numbers in the list [0,1,2,3,4,5,6,7,8,9,10] are larger than the number entered by the user. Assign the number entered by the user to a variable named "n'. Details: In a Python program, write a function named "largerThan" that accepts two arguments: a list, and a number. Call this function from a main) function. You must pass the list of numbers to the function largerThan along with the variable "n". The list should contain the numbers 0-10. The function should create a new list and add to this list any numbers that are greater than "n". The largerThan function should then display all of the numbers. At the end of the largerThan function, have a return statement that sends back the string "Done". In the main) function, print out the string sent back from the largerThan function using print)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

What are the important facts related to this situation?

Answered: 1 week ago

Question

7. How might you go about testing these assumptions?

Answered: 1 week ago