jackfrued / jackfrued/Python-100-Days
Day_7中学生成绩表:scoretable.py中,创建二维列表时的小问题
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 187k
- Forks
- 55.8k
- PR merge metrics
- No merged PRs in 30d
Description
def main():
names = ['关羽', '张飞', '赵云']
subjs = ['语文', '数学', '英语']
scores =[[0] * 3 * 3]
for row, name in enumerate(names):
print('请输入%s的成绩' % name)
for col, subj in enumerate(subjs):
scores[row][col] = float(input(subj + ': '))
print(scores)
打印的所有scorce信息与想要的结果不一致,应该是二维数组定义出错,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open scoretable.py and inspect the scores initialization before the nested input loops. Run the example with sample grades to observe the printed structure, then verify that each student's three subject values are stored in a separate row and displayed correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100