Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update project1 #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions project1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ def fib(number_for_fibonacci):


def is_prime(number_to_check):
# Add code here
# comment added by new user
return #boolean value
prime="True"
flag=1
for word in range((int(number_to_check))//2-2) :
if int(number_to_check)%int(word+2)==0 :
flag=0
break
if number_to_check=="1":
print(~prime)
elif flag==1:
print( prime)
else :
print(~prime)


def reverse_string(string_to_be_reversed):
Expand Down