Skip to content

Commit 2e71a3e

Browse files
authored
Add files via upload
1 parent f12489f commit 2e71a3e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Python Projects/QRcode.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import qrcode
2+
3+
data = input('Enter the text or URL: ').strip()
4+
filename = input('Enter the filename: ').strip()
5+
qr = qrcode.QRCode(box_size=10, border=4)
6+
qr.add_data(data)
7+
image = qr.make_image(fill_color='black', back_color='white')
8+
image.save(filename)
9+
print(f'QR code saved as {filename}')

0 commit comments

Comments
 (0)