#37. How to use functions in our Program | Even number | Prime Number | Python Tutorial
#37. How to use functions in our Program | Even number | Prime Number | Python Tutorial

In this video, I am to teach you how to use functions in Python programming language with practical examples. write a program to check number give number is prime or not write a program to check the given number is even or not using the function. Learn Python in One Video in Hindi: https://youtu.be/7GYHAJdHFbE Learn Core Java Basics : https://youtu.be/9yBlFPKiCdY Learn Servlet in Hindi: https://www.youtube.com/playlist?list=PL0zysOflRCel5BSXoslpfDawe8FyyOSZb Learn JDBC Programming : https://www.youtube.com/playlist?list=PL0zysOflRCenjuvOwumYLG9TCsEQZrV2M Learn c,java,python,kotlin basics : https://www.onlyjavatech.com/ TechSoft INDIA official website: https://www.techsoftindia.co.in/ Durgesh Tiwari Website : https://www.durgeshkumartiwari.com/ Follow me on Instagram: https://www.instagram.com/durgesh_k_t/ topic covered: how to use functions in a python program, program to check even number python program, how to check even number python program, the prime number program in python, print prime even numbers between 1 to 100 python, print even numbers between 1 to 100 python , correct way of using functions in python in hindi

Even_Print.py
``````#Function for checking even number
def isEven(n):
if n % 2 == 0:
return True
else:
return False

##################now going to call the function#####
n = int(input("Enter number :"))
if isEven(n):
print("Given number is even")
else:
print("Given number is not even")
################even number in range############
for i in range(1, 101):
if isEven(i):
print(i, end=" ")``````
Prime_Print.py
``````def isPrime(n):
f = 0
for i in range(1, n + 1):
if n % i == 0:
f = f + 1
if f == 2:
return True
else:
return False

##############################
# print(isPrime(13))

for i in range(1, 101):
if isPrime(i):
print(i, end=" ")``````