-
Notifications
You must be signed in to change notification settings - Fork 58
added some python codes #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
alnouirah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be great if you can add some extra explanation for this package !
| #example 2 | ||
| #added by @sagarbabalsure | ||
| #This example is like guess game.Where user try to guess the randomly generated number in three trials. | ||
|
|
||
|
|
||
| import string | ||
| import random | ||
| from random import randint | ||
| x = randint(1, 100) | ||
| print(x) | ||
| count=3 | ||
| while count>0: | ||
| y=int(input("Enter your guess: ")) | ||
| count=count-1 | ||
| if x==y: | ||
| print("Oh..your guess is correct") | ||
| else: | ||
| print("you have %d guesses remaining" %(count)) | ||
| if count==0: | ||
| print("sorry you lose") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is like guess game.Where user try to guess the randomly generated number in three trials.
adding new line at the end .
alnouirah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qr generator.
Modules/qr_en.py
Outdated
| #example 1 | ||
| #added by @sagarbabalsure | ||
| #This example create the "QR CODE" for entered string and make the file 'myqr.svg' in your present folder. | ||
| #By scanning this qrcode you can go to that url | ||
|
|
||
|
|
||
|
|
||
|
|
||
| import pyqrcode | ||
| from pyqrcode import QRCode | ||
| s=raw_input("Enter any url to make qr code: ") | ||
| url=pyqrcode.create(s) | ||
| url.svg("myqr.svg",scale=8) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding new line at the end .
codes for packages like numpy,random and pyqrcode