![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 14.11.2019 22:31 bheam12
Python:
the password must have at least 8 characters with at least one lowercase, one uppercase and one digit character. the program should repetitively ask user for a password till the entered password meets the specifications. then the program should ask the user to confirm the password; if it could not be confirmed then the whole process should start from the beginning.
# this program to set a password.
# this function returns true if the string s has
# no lowercase character otherwise returns false.
def nolowercase(s) :
upper_s = s. upper()
if s == upper_s :
return true
else :
return false
# this function returns true if the string s has
# no uppercase character otherwise returns false.
def nouppercase(s) :
lower_s = s. lower()
if s == lower_s :
return true
else :
return false
# this function returns true if the string s has
# no digit character otherwise returns false.
def nodigit(s) :
if s. count("0") > 0 :
return false
elif s. count("1") > 0 :
return false
elif s. count("2") > 0 :
return false
elif s. count("3") > 0 :
return false
elif s. count("4") > 0 :
return false
elif s. count("5") > 0 :
return false
elif s. count("6") > 0 :
return false
elif s. count("7") > 0 :
return false
elif s. count("8") > 0 :
return false
elif s. count("9") > 0 :
return false
else :
return true
# program to set a password.
# the password must have more than 8 characters
# with at least one uppercase, at least one lowercase
# and at least one digit character.
def main() :
print("this program will set your password.")
password_not_set = true
while password_not_set :
password = input("enter a password: ")
while : # complete the condition
print("password not allowed.")
print("must be longer than 8 characters with")
print("at least one lowercase, one uppercase and one digit.\n")
password = input("enter another password: ")
password_confirm = input("reenter to confirm the password.")
if : # complete the condition
print("password did not match, set another password.")
else :
# complete
print("your password has been set.")
main()
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 10:00
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
Python:
the password must have at least 8 characters with at least one lowercase, one upperc...
the password must have at least 8 characters with at least one lowercase, one upperc...
Questions
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 02.10.2020 17:01
![question](/tpl/images/cats/istoriya.png)
History, 02.10.2020 17:01
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 02.10.2020 17:01
![question](/tpl/images/cats/mat.png)
Mathematics, 02.10.2020 17:01
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 02.10.2020 17:01
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
History, 02.10.2020 17:01
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 02.10.2020 17:01
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
History, 02.10.2020 17:01
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/istoriya.png)
History, 02.10.2020 17:01
![question](/tpl/images/cats/istoriya.png)
History, 02.10.2020 17:01