Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trying to create a password and a age limit
- check it out if it need correction pls tell me
- while True:
- name = input('choose a username: ')
- password = input('select a password: ')
- age = input('enter your age: ')
- if int(age) < 12:
- print('hey kiddo you are not eligible')
- else:
- break
- def login():
- while True:
- user = input('enter your username: ')
- passw = input('enter your password: ')
- if user != name or passw != password:
- print('your username or password is not correct')
- else:
- break
- try:
- import re
- import urllib.request
- stock = input("search: ")
- url = 'https://www.dictionary.com/browse/' + stock
- data = urllib.request.urlopen(url).read()
- data1 = data.decode("utf-8")
- m = re.search('content=',data1)
- f = re.search('. See more.">', data1)
- star = m.end()
- end = f.start() +1
- new = data1[star:end]
- print(new)
- except:
- print('check your network')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement