File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ def check (n ):
2+ return True if int (n ) % 2 == 0 else False
3+ n = input ("Enter the Number: " )
4+ if check (n ):
5+ print ("Number is Even" )
6+ else :
7+ print ("Number is odd" )
8+
9+
Original file line number Diff line number Diff line change 1+ def Pal (number ):
2+ num = number
3+ return True if num == num [::- 1 ] else False
4+ num = input ("Enter the Number: " )
5+ if Pal (num ):
6+ print ("Number is Palindrome" )
7+ else :
8+ print ("Number is not Palindrome" )
9+
Original file line number Diff line number Diff line change 1+ name = input ("Enter the Name of Candidate: " )
2+ age = input ("Enter the age of Candidate: " )
3+ if int (age ) >= 18 :
4+ print (f"candidate { name } with age { age } is Eligible to Vote." )
5+ else :
6+ print (f"candidate { name } with age { age } is not Eligible to Vote." )
7+
8+
9+
You can’t perform that action at this time.
0 commit comments