import random
lowerlimit=int(input("Please input the lower limit of the range:\n"))
upperlimit=int(input("Please input the upper limit of the range:\n"))
print(f'you entered the range of {lowerlimit,upperlimit}')
randomvalue=int(random.uniform(lowerlimit,upperlimit)/100)
print(f'you can get ¥{100 * randomvalue} for bonus this time')
Tag: Python
bookmark_border11-Send a Mail with Py (Updating)
import smtplib
email_address='[email protected]'
rec_address='[email protected]'
email_password=input(str('please input your password: '))
smtp = smtplib.SMTP('smtp.gmail.com',587)
smtp.starttls()
smtp.login(email_address,email_password)
print('login success')
subject='i like xff'
body='xff you are so cute'
msg=f'subject:{subject}\n\n{body}'
smtp.sendmail(email_address , rec_address , msg)
print('mail sent successfully')
bookmark_border06-First Py_Open a post on my site (Updating)
import webbrowser
print("let us open a post from ericsson's site.")
era = input("please input the date of the post psoted in a form like 2020/06/27:")
post_title = input("please input the title of the post publlished in a form like D2-X1-X1:")
url = "https://www.hornyowl.site/" + era + "/" + post_title + "/"
try:
print("we have found this post for you:", url)
print("it should appear in your browser right now! ")
webbrowser.open(url)
except:
print("sorry,the post you are looking for doesn't exist on hornyowl.")