Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added question about a list #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Added question about a list #14

wants to merge 1 commit into from

Conversation

anshk8
Copy link
Collaborator

@anshk8 anshk8 commented Oct 21, 2023

No description provided.

```python
import random

input_len = input("What is the list length: )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
input_len = input("What is the list length: )
input_len = int(input("What is the list length: "))

Input returns a string and we are expecting an integer so this would be a way to avoid that error.
There was a missing quotation mark near the end of the input message.


Welcome to **RANDLIST**! Here is the problem statement:

You must input a number to determine the length of a list that will contain random numbers from 1-100. The last element of the list should be removed 3 times and you must return the list to be displayed in highest value to lowest value order.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be a bit more clear? Something like the remove the last element of the list 3 times and then sort the remaining elements

```python
import random

input_len = input("What is the list length: )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants