Write a python program to check whether the entered number is rational or irrational ?
Answers
Answered by
2
Explanation:
Write a Python program to check whether
a specified value is contained in a group
of values.
Test Data:
3 -> [1, 5, 8, 3] : True
-1 -> [1, 5, 8, 3] : False
def is_group_member(group_data, n):
for value in group_data:
if n == value:
return True
return False
print(is_group_member([1, 5, 8, 3], 3))
print(is_group_member([5, 8, 3], -1))
Similar questions
Hindi,
5 months ago
English,
5 months ago
Political Science,
5 months ago
Political Science,
10 months ago
English,
10 months ago
English,
1 year ago
Biology,
1 year ago