Skip to content

Instantly share code, notes, and snippets.

View Abhayparashar31's full-sized avatar
:octocat:
Learning New Things

Abhay Parashar Abhayparashar31

:octocat:
Learning New Things
View GitHub Profile
'''
candidateage = 30
candidate_exp = 5
candidate_salary_expectation = 95000
'''
if candidateage>18:
if candidate_exp>=2:
if candidate_salary_expectation<=100000:
print("Congrats ! You Are Eligible for the job")
else:
if candidateage>18 & candidate_exp>=2 & candidate_salary_expectation<=10000:
print("Congrats ! You Are Eligible for the job")
else:
print("Not! eligible")
x = 5
if x==5: print('x equals 5')
for i in range(x+5): print(i)
condition = True
x = 1 if condtion else 0
check = lambda x:True if x%5==0 else False
check(10) ## True
check(12) ## False
from algorithms.sort import merge_sort
if __name__ == "__main__":
my_list = [1, 8, 3, 5, 6]
my_list = merge_sort(my_list)
print(my_list)
------------------------------------------------
[1, 3, 5, 6, 8]
from moviepy.editor import *
video = VideoFileClip("sample_video.mp4") ## Video Link
# Make the text. Many more options are available.
txt_clip = ( TextClip("Live Your Dream To The Fullest",fontsize=70,color='white')
.set_position('center')
.set_duration(10) )
result = CompositeVideoClip([video, txt_clip]) # Overlay text on video
## Taking Two Integers as input
a,b = map(int,input().split())
print("a:",a)
print("b:",b)
## Taking a List as input
arr = list(map(int,input().split()))
print("Input List:",arr)
arr = [2,4,6,3,8,10]
for index,value in enumerate(arr):
print(f"At Index {index} The Value Is -> {value}")
'''Output
At Index 0 The Value Is -> 2
At Index 1 The Value Is -> 4
At Index 2 The Value Is -> 6
At Index 3 The Value Is -> 3
def check_anagram(first_word, second_word):
return sorted(first_word) == sorted(second_word)
print(check_anagram("silent", "listen")) # True
print(check_anagram("ginger", "danger")) # False