Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions GCD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def gcd(p,q):
gcd =1
if p%q==0:
return q
for z in range(int(q/2), 0,-1):
if (p%z==0) and (q%z==0):
gcd = z
break

print(gcd(4,3))
13 changes: 13 additions & 0 deletions LCM.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def lcm(x,y):
if x>y:
z=x
else:
z=y
while True:
if(z%x==0)and(z%y==0):
lcm=z
break
z+=1
return lcm

print(lcm(4,3))
27 changes: 27 additions & 0 deletions Qr_code_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# install all the libaries needed
# create a function that collects a text and converts it to a Qr code
# save the qrcode as a image
# run the function

import qrcode

def generate_qrcode(text):

qr = qrcode.QRCode(
version = 1,
error_correction = qrcode.constants.ERROR_CORRECT_L,
box_size = 10,
border = 4,
)

qr.add_data(text)
qr.make(fit=True)
img = qr.make_image(fill_color="Black", back_color="White")
img.save("giri01.png")



generate_qrcode("Hey guys im Sharan, this is my github account : https://github.com/sharan37600 ")