Skip to content

Commit

Permalink
Merge pull request #19 from ben05allen/clearing_screens
Browse files Browse the repository at this point in the history
cls else clear
  • Loading branch information
rohitagr0310 authored Oct 16, 2023
2 parents 75e329d + b704c7d commit 9eb724f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CS_Source Code.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def delete_roll():
os.rename("temp.dat", "stud.dat")
input("Press any key to continue....")


if not os.path.isfile("stud.dat"):
print("'stud.dat' file doesn't exist.")
print("1 -> Generate a new empty file")
Expand All @@ -188,7 +189,7 @@ def delete_roll():
print(40 * "=")
choice = input("Enter your choice: ")
print(40 * "=")

if choice == "1":
try:
file = open("stud.dat", "wb")
Expand All @@ -206,7 +207,7 @@ def delete_roll():


while True:
os.system("cls")
os.system("cls" if os.name == "nt" else "clear")
print(40 * "=")
print(
""" Main Menu
Expand Down

0 comments on commit 9eb724f

Please sign in to comment.