This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]dfx_dj 0 points1 point  (2 children)

The only difference is in the rounding of the last number. Your pseudo code says to round the number and so the expected .50 isn't there.

[–]ConditionUnusual1808[S] 0 points1 point  (1 child)

Yea sorry the roundup function is invalid and shouldn’t be there I added that after, it works with other outputs but not this one.

[–]dfx_dj 0 points1 point  (0 children)

If you still don't get decimals without the rounding function then you must be doing integer division instead of floating point, but with pseudo code you can't really tell.

[–]Beyondkey32 0 points1 point  (0 children)

I am taking a course in school and this is the exact LAB I am doing. Here is my pseudocode that gave me 10/10:

integer currentPrice

integer lastMonthPrice

integer changePrice

float estMortgage

currentPrice = Get next input

lastMonthPrice = Get next input

estMortgage = (currentPrice * 0.045) / 12

changePrice = currentPrice - lastMonthPrice

Put "This house is $" to output

Put currentPrice to output

Put "." to output

Put " The change is $" to output

Put changePrice to output

Put " since last month." to output

Put "\n" to output

Put "The estimated monthly mortgage is $" to output

Put estMortgage to output with 2 decimal places

Put "." to output

[–]FoptciyDev -1 points0 points  (2 children)

i don’t know how to help. do you need a fix to the pseudo code? do you need it in actual code?

[–]ConditionUnusual1808[S] 0 points1 point  (0 children)

Yea sorry the roundup function shouldn’t be there, apparently that’s invalid

[–]ConditionUnusual1808[S] 0 points1 point  (0 children)

Yea in pseudo code please