From 7b3df885b2f44b6b5e3fb1e88a90c21ad40eb9b2 Mon Sep 17 00:00:00 2001 From: nishantshekhada72 <91543273+nishantshekhada72@users.noreply.github.com> Date: Sat, 2 Oct 2021 13:34:43 +0530 Subject: [PATCH 1/2] Create Python Program to Generate a Random Number --- Python Program to Generate a Random Number | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Python Program to Generate a Random Number diff --git a/Python Program to Generate a Random Number b/Python Program to Generate a Random Number new file mode 100644 index 0000000..a035d9f --- /dev/null +++ b/Python Program to Generate a Random Number @@ -0,0 +1,6 @@ +# Program to generate a random number between 0 and 9 + +# importing the random module +import random + +print(random.randint(0,9)) From 8e54b2b86a520a05ec0d46d5b093499d950d1b5e Mon Sep 17 00:00:00 2001 From: nishantshekhada72 <91543273+nishantshekhada72@users.noreply.github.com> Date: Sat, 2 Oct 2021 13:37:35 +0530 Subject: [PATCH 2/2] Create Python Program to Check if a Number is Odd or Even --- Python Program to Check if a Number is Odd or Even | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python Program to Check if a Number is Odd or Even diff --git a/Python Program to Check if a Number is Odd or Even b/Python Program to Check if a Number is Odd or Even new file mode 100644 index 0000000..7ac6bae --- /dev/null +++ b/Python Program to Check if a Number is Odd or Even @@ -0,0 +1,9 @@ +# Python program to check if the input number is odd or even. +# A number is even if division by 2 gives a remainder of 0. +# If the remainder is 1, it is an odd number. + +num = int(input("Enter a number: ")) +if (num % 2) == 0: + print("{0} is Even".format(num)) +else: + print("{0} is Odd".format(num))