How do I create a function/method out of this code and then call it to the main()?
How do I create a function/method out of this code and then call it to the main()? Question: enter code hereThis is the original code that I wrote: while True: user_input = (input(">>",)) try: user_input = int(user_input) except ValueError: pass if user_input in range(1, len(something): break I want to put in a method: `get_user_answer(n: int, …
Total answers: 3