Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. with open("example.txt", "a") as myfile:
  2.     print("Hello students!! Here is a little program i made to test your knowledge on \ndifferent topics such as Maths, History and Geography :)")
  3.     Name = input("Please Enter your Name")
  4.     Age = input("Please Enter your Age")
  5.     YearGroup = input("Please enter your Year Group")
  6.     first_three_letters = Name[:3]
  7.     username = "".join((first_three_letters,Age))
  8.     myfile.write(username)
  9.     myfile.close()
  10.  
  11. with open("example2.txt", "a") as myfile:
  12.     password = input("Please create a password")
  13.     myfile.write(password)
  14.     myfile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement