Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Manshu Sharma Svastikkka

🏠
Working from home
View GitHub Profile
View Search my gists.md

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

View Supernatural.py
def multiplyList(myList):
# Multiply elements one by one
result = 1
for x in myList:
result = result * int(x)
return result
def solve(n):
c=0
View Horner rule.py
def hornerRule(poly,n,x):
result=poly[0]
for i in range(1,n):
result=result*x+poly[i]
return result
arr=list(map(int,input().split))
x=int(input())
len=len(arr)
print(hornerRule(arr,len,x))
View Merge Two linked lists.py
## Read input as specified in the question.
## Print output as specified in the question.
class Node:
def __init__(self,data):
self.data=data
self.next=None
def LinkedLists(arr):
head=None
tail=None
View 008. N-Dimensional Distance.py
import math
t=int(input())
res=0
for i in range(t):
p=int(input())
q=int(input())
res=res+abs((p-q)**2)
print(math.sqrt(res))
View 007. Clock Seconds.py
h=int(input())
m=int(input())
s=int(input())
a=input()
if a=="AM":
print(3600*h+m*60+s)
else:
print(3600*(h+12)+m*60+s)
You can’t perform that action at this time.