Skip to content

Soham-Village-College/File_IO_recap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File reading and writing recap

Fork this repo, complete as many of the challenges as you can and then submit a pull request.

You have 4 problems to solve.

  1. Write a shopping list in Notepad and save it as 'shopping.txt'. Write a program to read in the shopping list from the file and display it on the screen.
  2. Write a program which takes a list of six names and writes them to a file. Check that the file contains the six names on six separate lines.
  3. Create a file in Notepad which consists of a list of first names. Read in the file, sort it into alphabetical order, then write it back to the file again. Check that your file is now in alphabetical order.
  4. Create a text file in Notepad of user names and passwords. Ask the user to enter their user name and password. The system should read in the details from the file, then return one of these messages:
  • Your login is successful (correct username and password)
  • Incorrect password (username exists but password does not match)
  • This username does not exist (username does not exist in the file)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages