Files and bananas.<\/p>\n
Create a function called readNumbersFromFile that receives as a parameter a string with the name of a file (located in the same directory) of numbers. The file has a number on each line (assume all integers). Here is a link to an example file for you http:\/\/kenscourses.com\/tc101winter2015\/wp-content\/uploads\/2015\/01\/random_numbers.txt<\/a><\/p>\n The function will open the file, read the values and then print (that is right, this function returns no values) the following:<\/p>\n flickr photo<\/a> shared by Furryscaly<\/a> under a Creative Commons ( BY-SA ) license<\/a> <\/small><\/p><\/div>\n Write a function called check_banana that receives a single parameter of type string that is the name of a file in the same directory as the program. The function opens that file of text and counts the number of times that the string \u201cbanana\u201d appears. For full marks it should ignore case (so count Banana, BANANA, bAnAnA regardless of mix of upper and lower case characters).<\/p>\n Hint#2, you will want to be able convert strings to lower case:<\/p>\n As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag #QUIZ11 on your post so our blog hub picks that up.<\/p>\n You MUST<\/strong> include your code as links to GitHub.<\/p>\n <\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" Gone Bananas for Files Files and bananas. Question 1 Create a function called readNumbersFromFile that receives as a parameter a string with the name of a file (located in the same directory) of numbers. The file has a number on … Continue reading
\n<\/span><\/span><\/p>\n\n
Question 2<\/h2>\n
<\/a>\n
\n
Scoring<\/h2>\n
\n
What to Submit<\/h2>\n