Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(e) You are the programmer of an AI stock trading codrpany. Due to the measares for resuming cross-border travel in Japan, you have to mplement

image text in transcribed
(e) You are the programmer of an AI stock trading codrpany. Due to the measares for resuming cross-border travel in Japan, you have to mplement a part of buy kell algoritim and check out the dilly rate of Hong Kong Dollar to Japonese Yen sampled at 12pan every day. Help your customer write a prograns for some semple analysis according to the following tasks. - Read in the (sampled) dauly rate in a 5-day period and store them in a lest Include inpun data validation to check if the inpat is a positive number. In case of an error, print a suitable mensage and ask the user to re-enter - Add code to print the maxinum, minimum, and the average daly rant - Add code to print advice of "BUY". "HOL.D" and "SELL" according to the following rales concerved by Anders based on the daily rate on the las day Stubmat qle.py. [14 marks] The following shows an example execution of the peogram without inpeat error. (f) Complete the following two functions that can be used for lints. (a) This function receives a list of numbers and return the multiple of caly the negative numbers. The function shoald return None if there is no negtive number. Assume that the parameter numlest is a list. def nul theg (aunlist) (ii) This function retanss True if any number in the list porameter check is lurger than aay number in the list parameter numalist. Assume that both parameters are lists. def checktarger (aumist, eheck) Submat your solution containing the functions with a suitable main test program in qlf.py. [10 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What and where is the Quick Access Toolbar?

Answered: 1 week ago

Question

Distinguish between hearing and listening.

Answered: 1 week ago

Question

Use your voice effectively.

Answered: 1 week ago