user_input = input("Press 'p' to run program or 'q' to terminate: ")

while	user_input != "q":
	if user_input == "p":
		print("Hello")
	user_input = input("Press 'p' to run program or 'q' to terminate: ")