There are multiple problems with your main.py file.
- You should import your other two files to be able to use them.
- Your variable b holds a string so comparing it against the numbers 1, 2, 3 will never yields equality. You should store a number in b instead. The simplest solution is to cast the result of your input into an integral number.
- Not a problem, but optimization is to compare other values only if the previous comparison was false: use elif.
- If you use elif as suggested above, you can tell the user if they entered an invalid choice by adding a final else case.
Your main.py file fixed:
import random
import sys
import among
import fort
a=input("what is your name\n")
b=int(input("hi " + str(a) + " welcome to story mode,\nthe game is your choice,\n1=among us, 2=fortnite, 3=random\n"))
if b == 1:
among.among()
elif b == 2:
fort.fort()
elif b == 3:
d=[1,2]
e=random.choice(d)
if e == 1:
among.among()
if e == 2:
fort.fort()
else:
print("Invalid choice");