So I have a program here: https://repl.it/@cooperl2/Find-Student-Info-V4-FINAL-STABLE
Code:
import datetime
import sys
def find_info():
first_name = input("What is your first name? ").lower()
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
last_name = input("What is your last name? ").lower()
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
grade = input("What grade are you in? ").lower()
grade = int(grade[0])
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
year = datetime.date.today().year
month = datetime.date.today().month
shift = 1 if datetime.date.today().month < 9 else 0
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
pin = input("What is your lunch pin / ID number? ")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
grad_year = year + 13 - grade - shift
#this replaces the entire if statement in the V3 -- See V3 for details.
print("Hello there " + first_name+"!")
print("\n")
print("Your username is: " + last_name.lower() + first_name[0].lower() + str(grad_year)[2]+ str(grad_year)[3])
print("Your password is: " + first_name[0].lower() + last_name[0].lower() + pin + "hoh")
print("Your Email Address is: " + last_name.lower() + first_name[0].lower() + str(grad_year)[2]+ str(grad_year)[3] + "@learn.hohschools.org")
find_info()
However, when I run it on my computer via double-clicking on my desktop, it looks like the attached image. and the program quits after the 3rd question and does not complete. Not sure why that is and why there are the weird symbols.