Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are the programmer and a stock trader. You are interested in the Hong Kong stock market therefore you have decided to develop a program

You are the programmer and a stock trader. You are interested in the Hong Kong stock
market therefore you have decided to develop a program to analyze the Hang Seng
Index.
Read in the (sampled) daily closing level of the Hang Seng Index in a 5-day
period and store them in a list
o Include input data validation to check if the input is a positive
number. In case of an error, print a suitable message and ask the user
to re-enter
Add code to print the maximum, minimum, and the average daily rate
Add code to print advice of "BUY", "HOLD" and "SELL" according to the
following rules based on the daily rate on the last day of the 5-day period (i.e.,
day 5).

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

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago