{"id":437644,"date":"2018-08-30T14:51:21","date_gmt":"2018-08-30T14:51:21","guid":{"rendered":"https:\/\/essaypaper.org\/python-assignment-my-online-homework-helper\/"},"modified":"2018-10-24T09:03:52","modified_gmt":"2018-10-24T09:03:52","slug":"python-assignment-my-online-homework-helper","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/python-assignment-my-online-homework-helper\/","title":{"rendered":"Python assignment &#8211; My Online Homework Helper"},"content":{"rendered":"\n<div>\n<h2>How to submit this assignment<\/h2>\n<p>Your submission should be written in a <b>single Word document<\/b>.<\/p>\n<p>\u00b7 Clearly label each question and any sub-sections.<\/p>\n<p>\u00b7 Provide maximum possible comments so the code becomes easier to read.<\/p>\n<p>\u00b7 Copy and paste your code into the document under each related question heading.<\/p>\n<p>\u00b7 Then select the section of code and under the \u2018Home\u2019 tab in MS Word, select \u2018Styles\u2019 &gt; No Spacing. (This will remove all the extra blank lines from your code and make it easier to read.)<\/p>\n<p>\u00b7 Then set the font of any code to be \u201cConsolas\u201d or \u201cCourier New\u201d.<\/p>\n<p>\u00b7 <b>DO NOT<\/b> include images\/screen shots of code. Any images of code <b>will not<\/b> be marked.<\/p>\n<p>\u00b7 If your submission is difficult to understand, you will lose marks.<\/p>\n<p>\u00b7 When ready, post your <b>single Word document<\/b> to the Assignment Submission forum in Learnline.<\/p>\n<p>\u00b7 IMPORTANT TO NOTE: <b>DO NOT<\/b> use functions \/ commands to solve problems which were not taught in the class.<\/p>\n<h3>Question 1 Marks 05<\/h3>\n<p>Assume\u00a0s\u00a0is a string of numbers.<\/p>\n<p>Write a program that checks the string s for the values \u20182\u2019, \u20183\u2019, \u20185\u2019 and \u20187\u2019. When one of the values is found in the string, record its position within the string and continue to check for more occurrences. Finally, output the results found.<\/p>\n<p>For example, if\u00a0s = \u2018568714523645873\u2019, your program should print:<\/p>\n<p>2 \u2013 7<\/p>\n<p>3 \u2013 8 14<\/p>\n<p>5 \u2013 0 6 11<\/p>\n<p>7 \u2013 3 13<\/p>\n<p>Give Five (5) different examples with its output.<\/p>\n<h3>Question 2 Marks 05<\/h3>\n<p>Assume\u00a0s\u00a0is a string of numbers.<\/p>\n<p>Write a program that prints the longest substring of\u00a0s\u00a0in which the numbers occur in descending order. For example, if\u00a0s = \u2018561984235870154755310\u2019, then your program should print<\/p>\n<pre>Longest substring in numeric descending order is: 755310<\/pre>\n<p>In the case of ties, print the first substring. For example, if\u00a0s = \u2018742951\u2019, then your program should print<\/p>\n<pre>Longest substring in numeric descending order is: 742<\/pre>\n<h3>Question 3 Mark 05<\/h3>\n<p>You have recently returned to Australia after a holiday abroad. You have some unspent foreign currency that you need to convert back into AUD (Australian Dollars). Write a program that will allow you to enter two or more amounts of foreign currency and their associated exchange rate. Convert the amounts back into AUD and print the total sum of AUD received once all conversions are complete.<\/p>\n<p>Resulting program output might look similar to:<\/p>\n<pre>Enter currency amount:  100<\/pre>\n<pre>Enter exchange rate:  0.75<\/pre>\n<pre>100.0000 \/ 0.7500 = 133.33<\/pre>\n<pre>Enter currency amount:  100<\/pre>\n<pre>Enter exchange rate:  0.50<\/pre>\n<pre>100.0000 \/ 0.5000 = 200.00<\/pre>\n<pre>Total AUD received = $333.33<\/pre>\n<h3>Question 4 Mark 05<\/h3>\n<p>Write a python program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename and input the lines of text into a list. The program then enters a loop in which it prints the number of lines in the file and prompts the user for a line number. Actual line numbers range from 1 to the number of lines in the file. If the input is 0, the program quits. Otherwise, the program prints the line associated with that number.<\/p>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<h3>Question 5 Mark 10<\/h3>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<p>Write a program that encrypts and decrypts the user input. <b>Note<\/b> \u2013 Your input should be only lowercase characters with no spaces.<\/p>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<p>Your program should have a secret word that will be used for encryption\/decryption. Each character of the user\u2019s input should be offset by the value of the same character in your secret word. For example, if my secret word is \u201ccab\u201d and the user wants to encrypt \u201capples\u201d.<\/p>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<table>\n<tbody>\n<tr>\n<td>c<\/td>\n<td>a<\/td>\n<td>b<\/td>\n<td>c<\/td>\n<td>a<\/td>\n<td>b<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>a<\/td>\n<td>p<\/td>\n<td>p<\/td>\n<td>l<\/td>\n<td>e<\/td>\n<td>s<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>16<\/td>\n<td>16<\/td>\n<td>12<\/td>\n<td>5<\/td>\n<td>19<\/td>\n<\/tr>\n<tr>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>17<\/td>\n<td>18<\/td>\n<td>15<\/td>\n<td>6<\/td>\n<td>21<\/td>\n<\/tr>\n<tr>\n<td>d<\/td>\n<td>q<\/td>\n<td>r<\/td>\n<td>o<\/td>\n<td>f<\/td>\n<td>u<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<p>The encrypted output would be \u201cdqrofu\u201d.<\/p>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<p>The program should ask the user for input to encrypt, and then display the resulting encrypted output. Next your program should ask the user for input to decrypt, and then display the resulting decrypted output.<\/p>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<pre>Enter phrase to Encrypt (lowercase, no spaces):  apples<\/pre>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<pre>Result: dqrofu<\/pre>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<pre>Enter phrase to Decrypt (lowercase, no spaces):  dqrofu<\/pre>\n<pre>Result: apples<\/pre>\n<h3>Question 6 Mark 10<\/h3>\n<p>Write a python program that accepts a text file as input. The program should read the text file and display all unique words in alphabetical order. It should then display the non-unique words and the number of times that they occurred in the input text.<\/p>\n<p>Input file contains the following text:<\/p>\n<p><i>how much wood would a woodchuck chuck if a woodchuck could chuck wood<\/i><\/p>\n<p>Expected outcome should resemble:<\/p>\n<pre>Non-unique words and number of occurrences in no particular order:<\/pre>\n<pre>         wood  :  2<\/pre>\n<pre>         a  :  2<\/pre>\n<pre>         woodchuck  :  2<\/pre>\n<pre>         chuck  :  2<\/pre>\n<pre>Unique words in alphabetic order:<\/pre>\n<pre>         could<\/pre>\n<pre>         how<\/pre>\n<pre>         if<\/pre>\n<pre>         much<\/pre>\n<pre>         would<\/pre>\n<p>!End!<\/p>\n<pre><a rel=\"nofollow\" name=\"_GoBack\"\/><\/pre>\n<div style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.myonlinehomeworkhelper.com\/wp-content\/uploads\/2016\/04\/ordernow.png\" width=\"700\"\/><\/div>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to submit this assignment Your submission should be written in a single Word document. \u00b7 Clearly label each question and any sub-sections. \u00b7 Provide maximum possible comments so the code becomes easier to read. \u00b7 Copy and paste your <a href=\"https:\/\/www.benedictsol.com\/blogs\/python-assignment-my-online-homework-helper\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152,15],"tags":[],"class_list":["post-437644","post","type-post","status-publish","format-standard","hentry","category-completed-assignments","category-essay-paper-writing"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/437644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=437644"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/437644\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=437644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=437644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=437644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}