CodeSolved

A comprehensive source of programming questions and exercises

The examination of the couple of the number

Practice Easy 51/ Download 2071 Views

Write a function that receives a number and specifies or not to be paired by returning TRUE or FALSE

17 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
even_odd = lambda x : x % 2 == 0
num = int(input('number: '))
print(even_odd(num))
def iseven(num):
    return True if num % 2 == 0 else False
num = int(input('Enter num: '))
print(iseven(num))
User 251 Download Python
def is_even(number):
    """بررسی می‌کند که آیا عدد زوج است یا خیر."""
    return number % 2 == 0

# Example of the use of function
num = int(input("لطفاً یک عدد وارد کنید: "))
if is_even(num):
    print(f"{num} زوج است.")
else:
    print(f"{num} فرد است.")
Mma123 Download Python
try:
    x = int (input ("add: "))
except:
    print("error: lotfan add vared kon")
if (x % 2) == 0 :
    print ("true")
else:
    print ("false")
User 3026 Download Python
# The calculator of the pair or the individual
def zoj(a):
    return a % 2
X = int(input("Number: "))
if zoj(X) == 0:
    print("True")
else:
    print("False")
def even(a):
    if a%2==0:
        return True
    return False
i=int(input('adad:'))
print(even(i))
Maryam.n Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close