Question: Problem Description: You are asked to write a Python script that prompts the user to enter the number of items that should be displayed from

Problem Description: You are asked to write a Python script that prompts the user to enter the number of items that should be displayed from a list.

Concept(s) to Apply:

1. forin

2. range()

3. int()

4. input()

5. Variables

6. print()

Approximate Number of Lines in Solution: 5

Pseudocode

Declare a variable named numbers and set it to a list that contains the following ten numbers:

1

-2.5

777

777.77

-88

-88

1234

-1234

1.2345

-9.8765

Prompt the user to enter a numerical value without fractions or decimals for variable count with the following message: "Enter an integer number between 1 and 10: "

Change the data type of count to be an integer data type by using explicit type conversion.

Create a for loop that goes through the indices of numbers, but only up to the value of count, where variable current_index is used to represent the current index within the for loop and does the following:

Display the current number, by way of list indexing, in the console/output screen.

Pseudocode Notes

Remember that the list of indices for numbers should start at 0 and end at count 1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!