PSEUDOCODE
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
PSEUDOCODE
Hi, I am new to studying IT and i have an assignment question which is giving me trouble.
A little off topic, but if anyone here knows their pseudocode I have a question for you. I need to design an algorithm that calculates how much profit can be made by multiplying the remaining weight of stock and the price paid per KG. That part isn't too difficult however I need to apply profit margins: if the product was bought within 7 days only x% of it is profit, more than 7 days ago y% of it is profit.
Would appreciate any help and sorry for being off topic and a noob!!!
Lee!
A little off topic, but if anyone here knows their pseudocode I have a question for you. I need to design an algorithm that calculates how much profit can be made by multiplying the remaining weight of stock and the price paid per KG. That part isn't too difficult however I need to apply profit margins: if the product was bought within 7 days only x% of it is profit, more than 7 days ago y% of it is profit.
Would appreciate any help and sorry for being off topic and a noob!!!
Lee!
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: PSEUDOCODE
Does your question have anything to do with the LiveCode programming language?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: PSEUDOCODE
I suspect aBot walked in, since anyone who -
would know that it has nothing to do with designing an algorithm, but rather is more like a story-line that describes what you want to do in a particular language, so the question makes no sense.
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: PSEUDOCODE
seems very odd to me as I always thought that "pseudocode" was NOT something rigidlyknows their pseudocode
defined like "real" programming languages, but simply a way to jot down the logical
underpinnings that will need to be written into real code once one gets up and running.
Therefore there could be as many pseudocodes as there are people writing it.
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: PSEUDOCODE
Hi meobeou,
Pricing strategy for perishable food considering consumer's fairness perception
https://ieeexplore.ieee.org/document/6874114
and many more similar studies:
https://www.tandfonline.com/doi/abs/10. ... ode=tprs20
The first time that I learned about this topic was in 2003 while
working in a project for University ISA
https://www.isa.edu.do/
Here is an idea for calculating this:
1) Register /initial acquisition date for this product/initial sale price/
product code/current sale date/daily depreciation
For example:
2019-02-21/10.00 each Kg/Product I-23B03/2019-02-24/-0.012 cents
in this particular case, the product just lose 0.036 cents of its original value
from the day 21, so the store have the option to sell at the original price of
10.00 each Kg and give the buyer a coupon for the discount value (0.036 cents)
or add another product for that value (0.036 cents) to the purchase.
Tell me if this explanation makes sense as english is my second language.
Al
Looks like this assignment is similar to the topic of this IEEE paper:meobeou wrote: ↑Thu Jan 17, 2019 3:26 amHi, I am new to studying IT and i have an assignment question which is giving me trouble.
A little off topic, but if anyone here knows their pseudocode I have a question for you. I need to design an algorithm that calculates how much profit can be made by multiplying the remaining weight of stock and the price paid per KG. That part isn't too difficult however I need to apply profit margins: if the product was bought within 7 days only x% of it is profit, more than 7 days ago y% of it is profit.
Pricing strategy for perishable food considering consumer's fairness perception
https://ieeexplore.ieee.org/document/6874114
and many more similar studies:
https://www.tandfonline.com/doi/abs/10. ... ode=tprs20
The first time that I learned about this topic was in 2003 while
working in a project for University ISA
https://www.isa.edu.do/
Here is an idea for calculating this:
1) Register /initial acquisition date for this product/initial sale price/
product code/current sale date/daily depreciation
For example:
2019-02-21/10.00 each Kg/Product I-23B03/2019-02-24/-0.012 cents
in this particular case, the product just lose 0.036 cents of its original value
from the day 21, so the store have the option to sell at the original price of
10.00 each Kg and give the buyer a coupon for the discount value (0.036 cents)
or add another product for that value (0.036 cents) to the purchase.
Tell me if this explanation makes sense as english is my second language.
Al
Re: PSEUDOCODE
Exactly so. In the case of the (if not a bot) OP's post, they have already posted the psuedocode they are asking about.richmond62 wrote: ↑Thu Jan 17, 2019 7:23 pmseems very odd to me as I always thought that "pseudocode" was NOT something rigidlyknows their pseudocode
defined like "real" programming languages, but simply a way to jot down the logical
underpinnings that will need to be written into real code once one gets up and running.
Therefore there could be as many pseudocodes as there are people writing it.
Code: Select all
/* psuedo-code...*/
if the product was bought within 7 days then
x% of it is profit
else
y% of it is profit
end if
Last edited by bogs on Thu Jan 17, 2019 10:00 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: PSEUDOCODE
OP's first and only post here, nothing to do with LC, no sign of the OP since - I'm going to delete this thread soon unless there's a reason we should keep it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: PSEUDOCODE
I only feel bad Al put so much into it. That really is good information Al
Re: PSEUDOCODE
A discount of 3 cents for a product looks irrelevant but when you
start counting all the money offered in discounts, coupons and offers
suddenly collecting all these bits makes a lot of sense.
https://blog.accessdevelopment.com/ulti ... statistics
start counting all the money offered in discounts, coupons and offers
suddenly collecting all these bits makes a lot of sense.
https://blog.accessdevelopment.com/ulti ... statistics
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: PSEUDOCODE
I think this is nothing more than a "lazy so-and-so" trying to get someone else toan assignment question which is giving me trouble
do their work for them.
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: PSEUDOCODE
It's a sticky issue indeed. I borrowed heavily from the collective experience of the Ubuntu forums when drafting this forum's guidelines (see "Homework assistance" under "Suggestions for Posting":richmond62 wrote: ↑Fri Jan 18, 2019 11:35 amI think this is nothing more than a "lazy so-and-so" trying to get someone else toan assignment question which is giving me trouble
do their work for them.
https://forums.livecode.com/viewtopic.php?f=4&t=18885
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: PSEUDOCODE
LOL! This was the first time I've read that, and I found I broke all but 3 of the suggestions for posting