Question

"basic stamp 2" the language is pbasic i made a drinking machine BUT need help with...

"basic stamp 2"

the language is pbasic



i made a drinking machine BUT need help with a code that does the following math:


starting point of my drink tank is 100 and now visualize this scenario:

I decide to get a drink and choose a number like 60 in which i will have
40 leftover

NOW i decide to go back and choose 30 in which i will have
10 leftover

FINALLY i go back again and get the last remaining amount which is 10

-basically just write me a formula that keeps subtracting the same number from starting point till i get to
0

until i decide to restart (refuel)!!!

will get tumbs up
0 0
Add a comment Improve this question Transcribed image text
Answer #1

You can create a loop

let's take your scenario
startingpoint =100

create a loop as mentioned below

keep subtracting the number that you want till starting point > 0 . Once the starting point is 0, it will not execute.


do while (startingpoint > 0)
startingpoint = startingpoint - (number you want to subtract)
LOOP

Add a comment
Know the answer?
Add Answer to:
"basic stamp 2" the language is pbasic i made a drinking machine BUT need help with...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need help figuring out net volume of Naoh in data table (am I just subtracting starting...

    Need help figuring out net volume of Naoh in data table (am I just subtracting starting volume and final volume?) and questions, but need to know if I answered number 5 correctly, please. -09 244m Wao Estimating the Acid Content of a Soft Drink Lab Worksheet Section: Name: 1. Complete the Data Table below for each of your titrations. Titration #3 Practice Titration Titration #1 Titration #2 Molarity of NaOH used Starting Volume (mL) Final Volume (mL) Net Volume of...

  • i need help with activity 2. i thought a would be the speed increases as the...

    i need help with activity 2. i thought a would be the speed increases as the battary increases. but for b and c i am very confused. PHOTOELECTRIC EFFECT LAB Enter your answers to Canvas. Objectives: The main objective of this lab is to observe the photoelectric effect experiment qualitatively. From the observations, you will summarize the important relationship between the properties of the photoelectrons (average speed, kinetic energy) to the properties of the incident light (wavelength, frequency). You will...

  • I need help with my programming assignment. The language used should be java and the algorithm...

    I need help with my programming assignment. The language used should be java and the algorithm should use search trees so that you play against the computer and he chooses the best move. The tree should have all possibilities on the leaves and you could use recursion to so that it populates itself. The game can be a 3*3 board (no need the make it n*n). Please put comments so that I can understand it. Thanks The game of ‘Walls’...

  • In java language here is my code so far! i only need help with the extra...

    In java language here is my code so far! i only need help with the extra credit part For this project, you will create a Rock, Paper, Scissors game. Write a GUI program that allows a user to play Rock, Paper, Scissors against the computer. If you’re not familiar with Rock, Paper, Scissors, check out the Wikipedia page: http://en.wikipedia.org/wiki/Rock-paper-scissors This is how the program works: The user clicks a button to make their move (rock, paper, or scissors). The program...

  • Need some help with this assignment please. I did the other 2 sections fine but this...

    Need some help with this assignment please. I did the other 2 sections fine but this one i am having some issues with. We have a scenario where a client has emailed us. In the email response back to the client we have to do the following. 1. ID what additional documents the client needs to provide in order to do their taxes 2. ID applicable deductions and credits available for clients 3. differentiate typed of income and expenditures. MY...

  • Hi I need help with a java program that I need to create a Airline Reservation...

    Hi I need help with a java program that I need to create a Airline Reservation System I already finish it but it doesnt work can someone please help me I would be delighted it doesnt show the available seats when running the program and I need it to run until someone says no for booking a seat and if they want to cancel a seat it should ask the user to cancel a seat or continue booking also it...

  • I need aome help with this part of my lab. thank you! Kirchoff's Laws 4. Now...

    I need aome help with this part of my lab. thank you! Kirchoff's Laws 4. Now click on this link, which is another circuit I modified and created for this lab: http://tinyurl.com/y8toda84 A. Do not Click run/Stop. This is a circuit that has elements that are neither series nor parallel, as well as multiple voltage sources. The best way for us to analyze this circuit is to use Kirchoff's laws. From the text here are Kirchoff's laws: 1) The sum...

  • Python, given a code in class i just need help with the third bullet point ; using a and n (defin...

    Python, given a code in class i just need help with the third bullet point ; using a and n (defined in the second picture of python code) find the first digit for k! for k =1,...,n. you dont have to type in all this code just help me write the code in the first picture where it says: def benford(a): b = [0 for d in range(1,10)] #Do everthything in here return b 2.2 Generating data In this assignment...

  • My Parents Are Turning 65 and Need Help Signing Up for Medicare By Nancy H. Shanks...

    My Parents Are Turning 65 and Need Help Signing Up for Medicare By Nancy H. Shanks I’m in a pickle. My Baby Boomer parents are on the verge of turning 65. They just received their copy of Medicare & You in the mail from the Centers for Medicare and Medicaid Services at the Department of Health & Human Services. It’s time for them to think about a bunch of new things that happen when you turn 65, like signing up...

  • I need help with these not sure where to start or how to structure this. Cases...

    I need help with these not sure where to start or how to structure this. Cases ANALYSIS. Adelle Watson owns a CASE 3.1 BEHAVIOR OF COST AND BREAKEVEN ANALYSIS. Adelle small manufacturing company, Easy Bake, which makes one product, a cerat Bake, which makes one product, a ceramic pie plate that reas tures even heating that helps prevent pie shells from gett helps prevent pie shells from getting burnt in patches. It is one of the pro ucts carried by...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT