{"id":699,"date":"2012-01-29T13:17:38","date_gmt":"2012-01-29T13:17:38","guid":{"rendered":"http:\/\/prog.pwnict.co.uk\/?page_id=699"},"modified":"2013-06-15T06:21:37","modified_gmt":"2013-06-15T06:21:37","slug":"file-access","status":"publish","type":"page","link":"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/","title":{"rendered":"File access"},"content":{"rendered":"<p>These tasks are all related to file access.<\/p>\n<p><code><div class=\"child_pages child_pages-thumbnail\">\n<div id=\"child_page-1864\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/word-statistics-beginner\/\">Word statistics - Beginner<\/a><\/h4><div class=\"post_excerpt\">You are to create a program which will read in text from a file using the sample code below. The name of the text file will be \u201cwords.txt\u201d and must be placed in the same place as your code. myfile = open(\"words.txt\", \"r\") #[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1864\" -->\n\n<div id=\"child_page-1866\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/word-statistics-intermediate\/\">Word statistics - intermediate<\/a><\/h4><div class=\"post_excerpt\">You are to create a program which will read in text from a file using the sample code below. The name of the text file will be \u201cwords.txt\u201d and must be placed in the same place as your code. myfile = open(\"words.txt\", \"r\") #[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1866\" -->\n\n<div id=\"child_page-1868\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/word-statistics-hard\/\">Word statistics - hard<\/a><\/h4><div class=\"post_excerpt\">You are to create a program which will read in text from a file using the sample code below. The name of the text file will be \u201cwords.txt\u201d and must be placed in the same place as your code. myfile = open(\"words.txt\", \"r\") #[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1868\" -->\n\n<div id=\"child_page-1105\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/a-matter-of-age\/\">A matter of age<\/a><\/h4><div class=\"post_excerpt\">You have been given a text file containing the following data &#8211; bert,32 sally,13 mary,21 bill,25 You must save this data into a text file (with a file name of your choice). Your job is to read in this text file, order[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1105\" -->\n\n<div id=\"child_page-1875\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/keyword-game-beh\/\">Keyword game - beginner<\/a><\/h4><div class=\"post_excerpt\">Write a simple flash card program which will &#8211; Load up flash cards from a file Pick one at random Display the word \/ idea Wait for a few seconds or for a key press. Then display the answer<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1875\" -->\n\n<div id=\"child_page-1878\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/keyword-game-intermediate\/\">Keyword game - intermediate<\/a><\/h4><div class=\"post_excerpt\">Write a simple flash card program which will &#8211; Load up flash cards from a file Pick one at random Display the word \/ idea Wait for a few seconds or for a key press. Then display the answer Offer[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1878\" -->\n\n<div id=\"child_page-1370\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/save-the-score\/\">Save the score<\/a><\/h4><div class=\"post_excerpt\">You are to write a program which can load and save scores into a file. The file will be structrued as below &#8211; 1,masta,5000 2,bert,4325 3,sally,4011 4,sue,3834 5,Les,3731 Each score[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1370\" -->\n\n<div id=\"child_page-1882\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/keyword-game-hard\/\">Keyword game - hard<\/a><\/h4><div class=\"post_excerpt\">Write a simple flash card program which will &#8211; Load up flash cards from a file Pick one at random Display the word \/ idea Wait for a few seconds or for a key press. Then display the answer Offer[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1882\" -->\n\n<div id=\"child_page-1903\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/crossword-solver\/\">Crossword solver<\/a><\/h4><div class=\"post_excerpt\">You need to create a program which will ask the user for a word which has a number of unknown letters. When entering the unknown word into the computer you will use &#8220;*&#8221; for any unknown letters. For example, if the input was &#8220;ha**y&#8221;[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-1903\" -->\n\n<div id=\"child_page-701\" class=\"child_page\" style=\"width:50%;max-width:100%;\"><div class=\"child_page-container\"><div class=\"post_content\"><h4><a href=\"https:\/\/www.ihaz.codes\/UoB\/tasks\/file-access\/notepad\/\">Notepad!!<\/a><\/h4><div class=\"post_excerpt\">You must create a simple program which will act a bit like notepad! It must &#8211; Allow the user to open an existing file and load it all into memory Allow the creation of a file if the specified one does not exist. Allow[read more]<\/div><\/div><!-- .post_content  --><\/div><!-- .child_page-container --><\/div><!-- #child_page-701\" -->\n<\/div><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These tasks are all related to file access.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":562,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"categories":[],"class_list":["post-699","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/comments?post=699"}],"version-history":[{"count":0,"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/699\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/pages\/562"}],"wp:attachment":[{"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/media?parent=699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ihaz.codes\/UoB\/wp-json\/wp\/v2\/categories?post=699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}