File tree 4 files changed +73
-0
lines changed
4 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ import math
2
+ def is_prime (input_number ):
3
+ # You can start below this
4
+ if (input_number <= 1 ):
5
+ return False
6
+ if (input_number > 2 ):
7
+ for i in range (2 ,int (math .sqrt (input_number )+ 1 )):
8
+ if input_number % i == 0 :
9
+ return False
10
+ return True
11
+ if (input_number == 2 ):
12
+ return True
13
+
14
+ #2,((input_number//2)+1)
15
+ #2,int(math.sqrt(input_number)+1)
16
+
17
+ ### Please don't change anything below this line.
18
+ if __name__ == "__main__" :
19
+ number = int (input ())
20
+ print (is_prime (number ))
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ sum = 0
3
+ if (n > 0 ):
4
+ for i in range (n ):
5
+ a = int (input ())
6
+ sum += a
7
+ if (int (sum / n ))> 100 :
8
+ print ("Excellent!" )
9
+ else :
10
+ print ("Not Excellent!" )
Original file line number Diff line number Diff line change
1
+ n = int (input ())
2
+ if n > 0 :
3
+ maxi = int (input ())
4
+ print (maxi )
5
+ for i in range (n - 1 ):
6
+ a = int (input ())
7
+ print (max (maxi ,a ))
8
+ '''
9
+ # your code goes here
10
+ n=int(input())
11
+ maxi=0
12
+ for i in range(n):
13
+ a=int(input())
14
+ maxi=max(maxi,a)
15
+ print(maxi)
16
+
17
+
18
+ '''
19
+
Original file line number Diff line number Diff line change
1
+ '''
2
+ if(no==0):
3
+ product=0
4
+ else:
5
+ product=1
6
+
7
+ while no>0:
8
+ digit=no%10
9
+ sum=sum+digit
10
+ product=int(product*digit)
11
+ no//=10
12
+ result=product-sum
13
+ print(result)
14
+ '''
15
+ '''
16
+ N = int(input())
17
+ count = 0
18
+ num = map(int, input().split())
19
+ for ele in num:
20
+ if ele < 0:
21
+ count += 1
22
+ print(count)
23
+
24
+ '''
You can’t perform that action at this time.
0 commit comments