You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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))`
The text was updated successfully, but these errors were encountered:
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))`
The text was updated successfully, but these errors were encountered: