Mitchell S.

asked • 04/15/20

I need help with a Python assignment

This one needs a definite loop and the number iterations of that loop will be the total number of characters in YOUR first and last names. For example, if your name is Jane Doe then the loop will execute exactly seven (7) times (Jane has 4 characters and Doe has 3 characters). You must HARDCODE your own name into your program, e.g.,

first = "Jane"

last = "Doe"

Your program must figure out the total number of characters in the two names (hint: the len function is one easy way to do this).

You must use a for or while loop to prompt a user to enter each number. The number of numbers the user enters must match the number of letters in your names (for example, when Jane Doe runs her program she will be prompted to enter exactly seven numbers).

Once the loop has finished, your program must output the following:

Number of numbers entered.

Total of the numbers entered.

Average of the numbers entered.

Largest number entered.

Smallest number entered.

Sample output is shown below for Jane Doe's program (remember, you must hardcode your own name in your program).

Hello Jane Doe

Please enter enter 7 numbers.

Enter a number: 3

Enter a number: 2

Enter a number: 5

Enter a number: 7

Enter a number: 2

Enter a number: 4

Enter a number: 6

Number of numbers entered: xx

Total of the numbers: xx

Average of the numbers: xx

Largest number entered was: xx

Smallest number entered was: xx

1 Expert Answer


Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.