alexa-pi / alexa-pi/AlexaPiDEPRECATED

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

Đang mở
#169 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
584
Fork
427
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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](https://user-images.githubusercontent.com/79236151/143832248-1b560b0c-6b2f-4f5c-93fc-425367ade703.png)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.