Microsoft Word - 202102_LA3_CSCI1110.docx 202102 CSCI1110 Lab Assignment 3 In this lab assignment, you are required to enhance the Future Value Program. Please complete the follow exercises. 1. Please...

1 answer below »
Please complete both labs using pycharm.


Microsoft Word - 202102_LA3_CSCI1110.docx 202102 CSCI1110 Lab Assignment 3 In this lab assignment, you are required to enhance the Future Value Program. Please complete the follow exercises. 1. Please test the program lab3_1110_fvp_00woFunc.py. If you enter the numbers as follows, you should see the same output as well. Welcome to the Future Value Calculator Enter monthly investment: 0 Entry must be greater than 0 and less than or equal to 1000 Please try again. Enter monthly investment: 100 Enter yearly interest rate: 16 Entry must be greater than 0 and less than or equal to 15 Please try again. Enter yearly interest rate: 12 Enter number of years: 100 Entry must be greater than 0 and less than or equal to 50 Please try again. Enter number of years: 10 Future value: 23233.91 Continue? (y/n): y Enter monthly investment: 100 Enter yearly interest rate: 12 Enter number of years: 1 Future value: 1280.93 Continue? (y/n): n Bye! 2. Re-organize the code into the following four functions: • get_float(prompt, low, high) • get_int(prompt, low, high) • calculate_future_value(monthly_investment, yearly_interest, years) • main() Implement the functions, and save the source code in the Python file called fvp.py Test your source code in fvp.py file using the same inputs you entered for exercise 1, you should get the same output shown in the exercise 1. Total Points 100 Exercise1 Upload the test result 10 Exercise2 Implement get_int(prompt, low, high) function 20 Organized code in 4 functions 20 (5 points for each function) Upload the test result 10 Upload fvp.py file 40 Microsoft Word - 202102_LA4_CSCI1110.docx 202102 CSCI1110 Lab Assignment 4 In this lab assignment, you are required to write two functions, multiply and main. Ex-1: Create a function named Create a function named multiply. The function takes in two parameters, tm and nbr. The parameter tm has a default argument value of 2. Let the function return the result of the multiplication of nbr and tm. (Hint: pay attention to the positions of parameters.) Ex-2: You are required to implement a main () function that contain the necessary code to call the multiply function using a default argument one time, and call the function without using the default argument one time. Ex-3: Make sure to write code to call the main() function, so main() can be executed for testing your code. Total points Ex-1 Implement multiply function 20 Ex-2 Implement main function 20 Ex-3 called main function 10 Upload the source .py file 40 Upload the test results 10 Note that, please do not upload any compressed files.
Answered 1 days AfterMay 09, 2021

Answer To: Microsoft Word - 202102_LA3_CSCI1110.docx 202102 CSCI1110 Lab Assignment 3 In this lab assignment,...

Aditya answered on May 11 2021
146 Votes
def get_float(prompt, low, high):
while True:
value = float(input(prompt))
if
low < value <= high:
return value
else:
print('Entry must be greater than ',low,' and less than or equal to ',high,' Please try again.')

def get_int(prompt, low, high):
while True:
value = int(input(prompt))
if low < value <= high:
return value
else:
print('Entry must be greater than ',low,' and less than or equal to ',high,' Please try...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here