Answer:
The program in Python is as follows:
password = input("Password: ")
while(True):
if len(password) >=4 and len(password) <=8:
if password[0].isupper():
if password[-1].isdigit():
break;
password = input("Password: ")
print("Correct Password")
Step-by-step explanation:
This gets input for the password
password = input("Password: ")
This loop is repeated while the password does not meet the 3 rules
while(True):
This checks for length
if len(password) >=4 and len(password) <=8:
This checks if first character is upper case
if password[0].isupper():
This checks if last character is a digit
if password[-1].isdigit():
If the conditions are met, the loop is exited
break;
This gets input for password, if any of the conditions fail
password = input("Password: ")
This ends the program
print("Correct Password")