Skip to content

peter-abel/VIRTUAL-DOOR-LOCK-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

VIRTUAL-DOOR-LOCK-

Write a python program that simulates a door lock system such that:

• Password is set and stored in a variable, • Commands to instruct the door are stored in variables. • When a user enters the wrong password an error message is displayed and prompted to enter the password again. • When a user enters “open” a “The door is now open” statement is displayed, when the “open” is entered more that once, a message is displayed saying, “the door is already open” • When a user enters “close” a “The door is now locked” statement is displayed, when the “open” is entered more that once, a message is displayed saying, “the door is already locked” • When a user enters “quit” the process is terminated and message is displayed. • When a wrong message is entered or invalid key pressed a “Invalid input” message is displayed. • When the door is locked or open, it prints out the last date/time the door was opened, eg “Door Last open at 2022-07-05 08:46:20.535395”

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages