Subject Code: ACST890
Computer Science Assessment Answer
Assignment Task: ACST890
Question 1. In our file twain.txt, how would you convert all instances of the string ‘Huck’ to ‘HucK’?
Question 2. Consider the following python code, useragrument.py.
1. import sys
2. import stdio 3
3. stdio . write ( ’ Hi , ’)
4. stdio . write ( sys . argv [1])
5. stdio . writeln ( ’. How are you ? ’)
What happens if you try to execute userargument.py with each of the following command lines:
a. python userargument.py python or python3 userargument.py python
b. python userargument.py @!&^% or python3 userargument.py @!&^%
c. python userargument.py 1234 or python3 userargument.py 1234
d. python userargument.py Bob or python3 userargument.py Bob
e. userargument.py Bob f. python userargument.py Alice Bob or python3 userargument.py Alice Bob
Question 3. Write python code to test whether a given integer corresponds to a leap year in the Gregorian calendar.
Question 4. Compose a python program that takes two integers a and b from the command line and writes a random integer between a and b.
Question 5. Compose a python program that takes two integers m and d from the command line and writes True if day d of month m is between March 20 and June 1 ACST890 Data Analytics for Finance & Insurance Assignment 1 Task 1 v1.01 S1 2019 Please turn over 20, and False otherwise. (Interpret m with 1 for January, 2 for February, and so forth.)
Question 6. Compose a python program that calculates and writes the amount of money you would have if you invested it at a given interest rate (compounded continuously), taking the number of years t, the principal P, and the annual interest rate r as command-line arguments. The desired value is given by the formula Pert.
This Computer Science Assessment has been solved by our Computer Science experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.