Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Management Information System Expert

Assignment

Question 1

Assume s is a string of numbers.

Write a program that checks the string s for the values '2', '3', '5' and '7'. 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.

For example, if s = '568714523645873', your program should print:

2 - 7
3 - 8 14
5 - 0 6 11
7 - 3 13

Give Five (5) different examples with its output.

Question 2

Assume s is a string of numbers.

Write a program that prints the longest substring of s in which the numbers occur in descending order. For example, if s = '561984235870154755310', then your program should print

Longest substring in numeric descending order is: 755310

In the case of ties, print the first substring. For example, if s = '742951', then your program should print

Longest substring in numeric descendingorder is: 742

Question 3

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 theirassociated exchange rate.

Convert the amounts back into AUD and print the total sum of AUD received once all conversions are complete.

Resulting program output might look similar to:

Enter currency amount: 100
Enter exchange rate: 0.75
100.0000 / 0.7500 = 133.33

Enter currency amount: 100
Enter exchange rate: 0.50
100.0000 / 0.5000 = 200.00

Total AUD received = $333.33

Question 4

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.

Question 5

Write a program that encrypts and decrypts the user input. Note - Your input should be only lowercase characters with no spaces.

Your program should have a secret word that will be used for encryption/decryption. Each character of the user's input should be offset by the value of the same character in your secret word. For example, if my secret word is "cab" and the user wants to encrypt "apples".

c a b c a b
3 1 2 3 1 2

a p p l e s
1 16 16 12 5 19

4 17 18 15 6 21
d q r o f u

The encrypted output would be "dqrofu".
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.
Enter phrase to Encrypt (lowercase, no spaces): apples
Result: dqrofu

Enter phrase to Decrypt (lowercase, no spaces): dqrofu
Result: apples

Question 6

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.
Input file contains the following text:

how much wood would a woodchuck chuck if a woodchuck could chuck wood

Expected outcome should resemble:

Non-unique words and number of occurrences in no particular order:
wood : 2
a : 2
woodchuck : 2
chuck : 2

Unique words in alphabetic order:
could
how
if
much
would

!End!

Management Information System, Management Studies

  • Category:- Management Information System
  • Reference No.:- M93085778

Have any Question?


Related Questions in Management Information System

Business process management is the technique used by

Business process management is the technique used by organizations to comprehend and describe the activities that help them function. Good process management can help make organizations more efficient and productive. For ...

Answer the following question describe a b-tree

Answer the following Question : Describe a B-Tree implementation. Explain the details of a Binary Tree. What are real world examples of tree implementations? Describe the properties of a heap and provide a real world exa ...

Scenario you as the him director has been asked to give a

Scenario: You, as the HIM Director, has been asked to give a presentation to a group of new directors from other departments to explain Master Data during an informational session. You need to at minimum cover the use an ...

Describe two examples of a very poorly implemented database

Describe two examples of a very poorly implemented database that you've encountered (or read about) that illustrates the potential for really messing things up. Include, in your description, an analysis of what might hav ...

Question - are ltc beds the only place to put us are there

Question - Are LTC beds the only place to put us? Are there other alternatives that are more cost-efficient? Given issues of quality -- either perceived or actual -- in many LTCs, do we really even want to keep tradition ...

Assignment 1 question 1 should cultures within the united

Assignment 1 Question 1 Should cultures within the United States be expected to set aside some traditions or beliefs and integrate under a united social contract? And Why? 300-word response Assignment 2 In response to fe ...

Part 1identify at least five 5 algorithm differences that

Part 1 Identify at least five (5) algorithm differences that might be considered when choosing a sort algorithm. Offer examples of related sorts with the discussion of each difference considered. Part 2: Rationalize You ...

Research the it security policy used by your university or

Research the IT security policy used by your university or by some other organization you are associated with. Identify which of the topics listed in Section 14.2 this policy addresses. If possible, identify any legal or ...

Write two-page 1000 words paper1 articulate your own point

Write two-page [1000 words] paper: 1. Articulate your own point of view on how the network neutrality issue should be addressed and regulated? 2. What are the effects of the current network neutrality regulations on the ...

Question what are some of the key factors to consider when

Question : What are some of the key factors to consider when gathering requirements for a network? What difficulties might you encounter in this process, and how might you mitigate the problems? Discuss some methods you ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As