Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

QBasic questions

  1. Oct 11, 2005 #1
    There are a few things that I can't remember learning in my Computer Programming class, and I haven't been able to find the answers. Can anyone tell me how to:
    -round a number to a certain number of decimal places?
    -use dates (month day, year) as response to input as a single variable?
    -how/why to use a "line input prompt"?
    Thank you.
     
  2. jcsd
  3. Oct 11, 2005 #2

    ranger

    User Avatar
    Gold Member

    I guess you could use the print using command.

     
  4. Oct 11, 2005 #3
    best to forget QBasic and use python. QBasic is a horrid language that promotes bad programing.
     
  5. Oct 12, 2005 #4

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    If you like Python then you'll love VPython - a free add-on that lets you do 3D graphics animation very easily!
     
  6. Oct 12, 2005 #5
    My first language was qbasic..
     
  7. Oct 12, 2005 #6
    and it is a crappy language.
     
  8. Oct 12, 2005 #7

    ranger

    User Avatar
    Gold Member

    I wont say its a crappy language. Its just not as versatile as other programming languages. Its a easy language to learn; meant for beginners. Visual BASIC was the first programming language I learnt. I moved on to other languages such as C, and we I look back a BASIC I can see how limited it was, but it certainly was not crappy.
     
  9. Oct 12, 2005 #8
    it is a spaghetti code language. it is crappy. and VB is worse because it attempts to add Object layers to Basic but makes it come out as a kludge.
     
  10. Oct 12, 2005 #9

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    All computer languages have their merits (and faults) and none of them are perfect. One chooses a language for a particular task based on the goodness of fit between the language and the task at hand as well as one's proficiency with the tools available. I think the computer language wars are rather pointless and silly.

    Someone asks for help with a particular language and the response is to bash the language and its implementations?
     
  11. Oct 12, 2005 #10
    Here Here!

    I have the languages I don't like, but thats only because I find reasonable alternatives for my uses. Nobody writes full scale apps in assembly because its time consuming .. but that would be the most efficient method of code... you have to strike a balance of necessity. If people want to start bashing languages, then I'll go ahead and started opening up some holes .. especially on python lovers.. Object Oriented is good... on paper.. like capitalism, and communism .. in reality it doesn't work well. BASIC was a building block for the IBM .. despite Apple really being a lot more advanced... but.. anyways, BASIC has its uses.. Shell scripting is extremely useful when you use it to do what its meant to do .. same with BASIC.... python is meant to make coding easier for nonfunctional programmers ... at least BASIC doesn't consume nasty amounts of resources just to do something simple .
     
  12. Oct 13, 2005 #11
    The usefulness of a language doe snot mean that it is not crappy.

    fact is that Python fits all the situations that Basic and VB can fit and does a better job.
     
  13. Oct 13, 2005 #12

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    Well, good for you! :)

    But can you answer the original poster's questions?
     
  14. Oct 13, 2005 #13

    ranger

    User Avatar
    Gold Member

    Wow what a topic this has turned out to be :yuck:
     
  15. Oct 13, 2005 #14
    Thank you very much, my questiosn were all answered between this post and my class, except for the question about the line input prompt. Is that the same as input? If not, what is the difference? Thank you for the assistance. P.S. Whether or not QBasic is the best it is generally seen as the best for beginners, in the second semester I'll be learning Visual Basic, and hopefully next year C++. I might try to take additional classes to learn others at some point also. Even if none are perfect, at leats there is plenty of variety.:smile:
     
  16. Oct 13, 2005 #15

    ranger

    User Avatar
    Gold Member

    You should watch what you say here because certain people may characterize what you are trying to learn as being inferior and will try discourage you.
     
  17. Oct 13, 2005 #16
    Well, at my school they only teach QBasic, Visual Baisc, and C++. At the local college I might take some classes, but I think they only offer C++ and Java. Any others I would need to teach myself (if I took up a seperate computer language it would just give me another excuse not to do school work at this point).
     
  18. Oct 13, 2005 #17
    no offense, but that program is pretty weak. My program had C++, java, Ada, LISP, Assembly (no particular dialect, it was a theoretical Architecture), PHP, Perl, Javascript, Pascal, and a few others.

    your program has to expose you to more languages than that. what are the other courses that you have to take?
     
  19. Oct 13, 2005 #18
    if he is doing it for a class, then it is not that big of an issue, but come on. stop being politically correct about languages. Would you use SnoBol today? How about B? Basic is not a good language give today's choices and methodology, just as SnoBol is not a good language given todays choices and methodology.
     
  20. Oct 14, 2005 #19
    I'm in high school (also correction: she). It's not a huge school, so there is not much selection with computer langauges. Also, I rechecked and the local college also offers some classes in Perl, Linux, and others. However I'm surprised that there was such a selection at ComputerGeek's school. Are you talking about a high school program or a college program?
     
  21. Oct 14, 2005 #20
    did you mention you were in HS? If so, I glanced over that. in any case, I am talking about a college curriculum which was the frame of reference I was coming from when you started this thread.

    I am glad to hear that you are a girl because there are so few girls in Computer science as compared to boys. I am also not as critical now that I know it is a High School program because that is actually a very robust program for a high school. They should however dump QBasic and Visual Basic if their intent is to teach programming. I am not trying to sound like a python evangelist, but as far as kids learning to program, Python enforces best practices, is very easy to learn, and is very powerful. so it covers everything that Qbasic and VB do, plus it teaches good programming techniques. I suggest that you pick up a book about python and learn the language if you are interested.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: QBasic questions
  1. CPU question (Replies: 6)

  2. Fortran question (Replies: 2)

  3. Fortran Question (Replies: 32)

  4. Randomization Question (Replies: 4)

Loading...