Results 1 to 9 of 9

Thread: Totally lost

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Totally lost

    I have to write a program for my physical chemistry lab and I have absolutely no experience with programming. I understand some of the basic commands (print, rem, etc.), but I don't know how to enter information and I don't know how to run programs that I've written. I really pretty much have no idea what I'm doing. Is anyone willing to help? Thanks so much in advance!

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Re: Totally lost

    I also have freebasic and emergence basic, if that helps...

  3. #3
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Red face Re: Totally lost

    Welcome rlm16.
    Sure there are lots of people who can help you it is what this forum is for
    Don't be confused and approach the problem bit by bit.
    Since this is assignment we would desist from providing the full length codes instead show you the directions as to how to solve your problems (of course at specific issues coding would be provided).
    First state clearly what your teacher asked you to do.
    Second what language of progamming you are working on (VB6,VS 2003,VS 2005, C, C++,C# etc)
    Third state how much of programmig was taught meaning what commands,looping structures, conditional statements (if..else...endif etc)

    Most important if your progamming language is not VB6 or previous versions then go to the appropriate forum from the home page and post your question there else continue in this forum.
    Happy programming

    We do not do home work

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Totally lost

    Moved to Other Basic

    What is free basic? I've never heard of that.

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Re: Totally lost

    Nothing was taught in class, bu we are given a sample program (without explanation).

    I'm using BASIC, but I'm not sure what version. We were given a link to download Chipmunk BASIC. I have a PC with Windows XP.

    We are supposed to write a program that will makes least-squares calculations to analyze data from an experiment. I have been able to figure out certain commands, like rem and print and I get the basic idea, but I can't even figure out how to execute, open, or save programs in the Chipmunk program. I think we should start there. Thanks again for your help! I'm not trying to get someone to write this for me, I just need a little tutoring to be able to write it myself.

  6. #6

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Re: Totally lost

    I just downloaded another program that I understand more. I can now write a simple program to count to ten and save and run it.

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Totally lost

    In order for us to give you any help, we'd have to be able to run the basic interpreter you're running. Chipmunk is very different from, say, VB. Include a link to the download for whatever interpreter you decide to write the program in, so anyone who wants to help you can download it and give you more than generic advice (like "Save the code you've just entered, however theinterpreter saves it).
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Re: Totally lost

    I am now using Liberty BASIC, which can be downloaded at
    http://www.libertybasic.com/download.html

    I have learned several commands and I can now write very basic (no pun intended) programs. For example, I just wrote this:

    REM This is a program for calculating sales tax

    [Home]
    INPUT "Enter item price: "; amount
    IF amount=0 THEN GOTO [Instructions]
    LET tax=amount*0.05
    PRINT
    PRINT "Price: "; amount
    PRINT "Sales Tax: "; tax
    PRINT "Total: "; amount+tax
    PRINT
    GOTO [Home]

    [Instructions]
    CLS
    PRINT "This is a program for calculating sales tax and totals."
    PRINT "When asked to enter item price, enter the price listed on the item."
    PRINT "Hit Enter and the price, sales tax, and total should appear"
    PRINT
    GOTO [Home]

    Sorry, I can't remember what I'm supposed to type to denote code.

  9. #9

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    8

    Re: Totally lost

    I was just able to program this:

    'This is an integer guessing game.

    [Instructions]
    PRINT
    PRINT "This is a guessing game. I pick a random integer between 1 and 100 and you try to guess what it is."
    PRINT "If you guess correctly, you win!"
    PRINT "If you guess incorrectly, I will tell you higher or lower to help you get the right answer."
    PRINT "When you win, I will tell you how many guesses it took."
    PRINT "Let's start!"
    PRINT
    PRINT "Ready?"

    [PickInteger]
    answer=int(rnd(1)*100)+1

    [Guess]
    LET count=count+1
    INPUT "Guess an integer between 1 and 100. Then press Enter. "; guess
    IF guess=answer THEN GOTO [Win]
    IF guess<answer THEN GOTO [Higher]
    IF guess>answer THEN GOTO [Lower]

    [Higher]
    PRINT
    PRINT "Higher!"
    GOTO [Guess]

    [Lower]
    PRINT
    PRINT "Lower!"
    GOTO [Guess]

    [Win]
    CLS
    BEEP
    BEEP
    BEEP
    PRINT
    PRINT "You won!"
    PRINT "The correct answer is "; answer; "."
    PRINT "It took you "; count; " guesses to get the right answer."
    PRINT
    LET count=0
    INPUT "Would you like to play again (Y/N)? 6"; again$
    IF instr("Yesyes", again$)>0 THEN GOTO [PickInteger]

    [End]
    PRINT
    PRINT "Thanks for playing!"

    This is fun!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width