Created
May 19, 2014 08:18
-
-
Save mayuroks/0cf6d1ba4447a8129ece to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
StNumber, StMark = input('Enter student number and student mark separated by a comma') | |
StNumber = StNumber.upper() | |
if len(StNumber)==9 and StNumber[0:6].isalpha() and StNumber[6:].isdigit(): | |
with open("output.txt", "w") as f: | |
f.write(StNumber + "," + StMark + "\n") | |
else: | |
print("Invalid student number") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment