jackfrued / jackfrued/Python-100-Days

Day 2 练习一有问题,求指教

Open
#600 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
187k
Forks
55.8k
PR merge metrics
No merged PRs in 30d

Description

Day 2 练习一:将华氏温度转换为摄氏温度,为什么 这句 c = (f - 32) / 1.8 ,每次都提示 ValueError: could not convert string to float: 'c = (f - 32) / 1.8' ,哪位大佬可以帮忙解答吗?
救救小白!
我的code:

f = float(input('请输入华氏温度: '))
c = (f - 32) / 1.8
print('%.1f华氏度 = %.1f摄氏度' % (f, c))

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the code block and ValueError reported in issue #600. Reproduce the snippet with the exercise's expected input and inspect where the conversion error occurs. Done means documenting the cause and clarifying the expected input or lesson guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
content
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.