ahnaf012 commited on
Commit
24dd474
·
verified ·
1 Parent(s): f5b4910

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -18,17 +18,17 @@ def check_prime(n:int)-> str: #it's import to specify the return type
18
  """
19
  output = "The given integer is"
20
  if n < 2:
21
- return f"{output} False."
22
  if n in (2, 3):
23
- return f"{output} False."
24
  if n % 2 == 0 or n % 3 == 0:
25
- return f"{output} False."
26
 
27
  limit = int(math.sqrt(n))
28
  for i in range(5, limit + 1, 6):
29
  if n % i == 0 or n % (i + 2) == 0:
30
- return f"{output} False."
31
- return f"{output} True."
32
 
33
  @tool
34
  def get_current_time_in_timezone(timezone: str) -> str:
 
18
  """
19
  output = "The given integer is"
20
  if n < 2:
21
+ return f"{output} not prime."
22
  if n in (2, 3):
23
+ return f"{output} not prime."
24
  if n % 2 == 0 or n % 3 == 0:
25
+ return f"{output} not prime."
26
 
27
  limit = int(math.sqrt(n))
28
  for i in range(5, limit + 1, 6):
29
  if n % i == 0 or n % (i + 2) == 0:
30
+ return f"{output} not prime."
31
+ return f"{output} prime."
32
 
33
  @tool
34
  def get_current_time_in_timezone(timezone: str) -> str: