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

zybook 8.18.1: Ch 8 Warm up: People's weights #169

Open
Robledog87 opened this issue Nov 29, 2021 · 0 comments
Open

zybook 8.18.1: Ch 8 Warm up: People's weights #169

Robledog87 opened this issue Nov 29, 2021 · 0 comments

Comments

@Robledog87
Copy link

Robledog87 commented Nov 29, 2021

Zybook lab activity 8.18.1 having issues submitting on main.py (python)
error:
Exited with return code 1.
Traceback (most recent call last):
File "main.py", line 11, in
index = int(input('Enter a list index (1 - 4):\n'))
EOFError: EOF when reading a line

my code:
'weights = [float(input('Enter weight 1:\n')),
float(input('Enter weight 2:\n')),
float(input('Enter weight 3:\n')),
float(input('Enter weight 4:\n'))]
print("Weights:", weights)

print('\nAverage weight: %.2f' % (sum(weights) / len(weights)))

print('Max weight: %.2f' % (max(weights)))

index = int(input('Enter a list index (1 - 4):\n'))
print('Weight in pounds: %.2f' % weights[index - 1])
print('Weight in kilograms: %.2f' % (weights[index - 1] / 2.2))

print('\nSorted list:', sorted(weights))`

Screenshot 2021-11-29 020126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant