I don't understand these errors. by the way I have removed the file names. I just separated my code into a couple of different files for easier access. imported them into the main one and at first, it didn't work when I directly imported them but when I imported them as a different name it worked. Also below is my main.py code if it helps. This code just repeats itself over and over.
from time import sleep as s
from sys import exit
def opening():
q = 0
print("Welcome to hangman")
s(1)
print("Let's get started by welcoming the players.")
s(1)
while q == 0:
contd = input("Do you want to carry on or quit? ").lower()
contdornot = ["carry on", "quit"]
if contd in contdornot:
if contd == contdornot[0]:
break
elif contd == contdornot[1]:
print("Goodbye")
exit()
elif contd not in contdornot:
print("Please say 'carry on' or 'quit'")
s(1)
opening()
def players():
i = 0
player1 = input("Player 1, what is your name: ")
print(f"Welcome {player1}!")
s(1)
while i == 0:
player2 = input("Player 2, what is your name: ")
if player2.lower() != player1.lower():
print(f"Welcome {player2}!")
break
elif player2.lower() == player1.lower():
print("Name cannot be the same as player 1!")
s(1)
players()
import wordchoosing as wc
import guessing as gs
import decidingturn as dt
person, oppositeplayer = dt()
wordname = wc()
tries = gs.letter_guess1()