Advertisement
Jexal

9a0ab750-9f6d-4ca4-834a-f745830ee9f6

Mar 4th, 2025
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. def function_to_be_dormant():
  2.     """Function that remains dormant until activated."""
  3.     print("Function is now active")
  4.     # Function logic here
  5.  
  6. def main():
  7.     while True:
  8.         user_input = input("Type 'activate' to run the function or 'exit' to quit: ").strip().lower()
  9.         if user_input == "activate":
  10.             function_to_be_dormant()
  11.         elif user_input == "exit":
  12.             print("Exiting...")
  13.             break
  14.         else:
  15.             print("Invalid input. Try again.")
  16.  
  17. if __name__ == "__main__":
  18.     main()
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement