PabloAA007 / Pseudocoding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pseudocoding

Conditionally Yours, Part 1

In part one of this two-part activity, you will pseudocode a solution for identifying whether or not a stock should be purchased, based on the percent increase or decrease in stock price. In part two, you will implement your algorithm.

Background

Harold just returned from a meeting with his supervisor with a huge grin on his face. Thanks to your program, Harold was able to spend more time making decisions about which stocks to buy and sell; he now has the second highest profit earnings for the week.

While on your lunch break together, you start proposing ideas about how the program can be taken to the next level. Harold's ears perk up when you mention that you can add logic that identifies whether or not a stock should be purchased based on the percent increase or decrease in stock price.

Harold knows that this would allow him to focus only on buying and selling; the program would handle all decision making and get him one step closer to securing the title of top trader for weeks to come. You begin considering the requirements for the enhanced program.

For this activity, work with a partner to pseudocode a program that will:

  • Calculate percent increase or decrease in stock price for Netflix.

  • Identify a viable percent increase/decrease that will indicate buy or sell action. Assume a 20% increase or decrease in stock price should warrant buy or sell action.

  • Use conditional statements to determine whether or not a stock should be purchased or sold:

    Increase = Current Price - Original Price

    Percent Increase = Increase / Original x 100

Instructions

Complete the following steps:

  1. Pseudocode variable declaration.

  2. Pseudocode percent_increase calculation.

  3. Pseudocode if-else logic to determine the buy or sell recommendation.

About


Languages

Language:Python 100.0%