jackfrued / jackfrued/Python-100-Days
Day4 练习1也可以根据商是否为整数来进行判断
Open
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 187k
- Forks
- 55.8k
- PR merge metrics
- No merged PRs in 30d
Description
number = int(input('请输入一个正整数:'))
if number <= 0:
print('非正整数!')
elif number == 1:
print('1既非素数也非合数')
else :
for x in range(2, number+1):
r = number / x
if r.is_integer() and x != number:
print ('%d非素数,可被%d整除' % (number, x))
break
else:
print ('%d是素数' % (number))
break
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
Start with the Day4 Exercise 1 material and inspect how the current prime-number exercise is presented. Compare the suggested quotient-based approach with the existing lesson and examples; done means the exercise consistently reflects the accepted approach and its expected output remains clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- content
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100