#6 Learn Small Basic Programming - Loops

Поділитися
Вставка
  • Опубліковано 20 гру 2024

КОМЕНТАРІ •

  • @boa2145
    @boa2145 2 роки тому +1

    Thanks for the video about definite and indefinite loops in Small Basic. It was exciting how it worked with the hard-working turtle, but also with text inputs such as asking for a password.

  • @willsgrandad
    @willsgrandad 5 років тому +4

    Like the finger counting for the brackets analogy. Checked my code for the times table program, I missed out the brackets around the (Num*i ) in the formula. Still worked tho’. Great tutorial. I remember starting out on a ZX81 back in the 80’s. It brought back memories. Thanks.

  • @12_jawanza
    @12_jawanza 3 роки тому +2

    Very nice teacher I hope your safe keep on making tutorials absolutely love your style

  • @kacubemember3077
    @kacubemember3077 4 роки тому +2

    Hello @The Tech Train! Nice to see your progress!
    I have some small doubts.
    1. Can we add multiple variables in the code in Small Basic like we add multiple numbers together in math?
    2. Can I line break any line code in Small Basic as sometimes it gets too long but I still want it to be of the same line code?
    Hoping to hear an answer from you

  • @rembrandtes
    @rembrandtes 4 роки тому +4

    nice video well explained ..... sorry I have to subscribe..

    • @s4dhy029
      @s4dhy029 3 роки тому

      why do you have to say sorry? i do not want to start a war, because i dont get it, but why?

  • @medomedoda
    @medomedoda Рік тому +1

    Thank uou

  • @Zxter
    @Zxter 2 роки тому +1

    Is thought by sign it meant you can enter any other password other than the password given and you will get through but it actually meant the loop will not work until the password to fluffy 123. Smart.

    • @TheTechTrain
      @TheTechTrain  2 роки тому

      The '' symbol means "is not equal to".

  • @gamershopesmp5462
    @gamershopesmp5462 2 роки тому +1

    you teavh like my sir i like your learning and i want to become software enginer

  • @dead2551
    @dead2551 3 роки тому +1

    One question: even tho it's not related to loop *(I think)* , however, what command will I use if I want for my program to never show "Press any key to continue" in the end and always have the space to write *([TextWindow.Read()])* until I close the window or use Program.End()?
    *Example: EX = TextWindow.Read()*
    *If EX = 1*
    *Program.End()*
    *EndIf*
    *If EX = 2*
    *TextWindow.WriteLine("heyo")*
    whenever I finish that program and type 2 it will say heyo and the "Press any key to continue..." but I want to always be possible to rewrite an answear. If my explanation was a little confusing.. I just want to write all the time '-'

    • @starleaf-luna
      @starleaf-luna 3 роки тому

      EX = TextWindow.Read()
      If EX = 1
      Program.End()
      EndIf
      If EX = 2
      TextWindow.WriteLine("heyo")
      add this code into an indefinite loop

    • @starleaf-luna
      @starleaf-luna 3 роки тому

      While True
      EX = TextWindow.Read()
      If EX = 1
      Program.End()
      EndIf
      If EX = 2
      TextWindow.WriteLine("heyo")
      EndWhile

  • @auguiba7097
    @auguiba7097 3 роки тому

    hi plz reply to me as fast as y can i have a project for school were gonna use loop to make a similar graphic as 18:05 but with rectangles not hexagones and we cant use For/To loops we have to use while loop technique plz tell me how plz reply as fast as y can !

    • @auguiba7097
      @auguiba7097 3 роки тому +1

      anyone reply helooooo

    • @TheTechTrain
      @TheTechTrain  3 роки тому

      I will send you a reply a little later today.

    • @auguiba7097
      @auguiba7097 3 роки тому

      @@TheTechTrain thx broo but plz before wed

    • @auguiba7097
      @auguiba7097 3 роки тому

      @@TheTechTrain brooo where r y im soory for aannoying y butt plz if y can give me the codes and ill copy paste them plz bro i want them for tomorow

    • @TheTechTrain
      @TheTechTrain  3 роки тому

      I'm so sorry, I have been extremely busy just recently. I'm not going to just hand over a completed homework for you, but here are two pieces of code. The first draws a hexagon, using a 'For' loop, and the second draws a square using a 'While' loop. If you look at them both and try them out, I am hoping you can work out the solution from this:
      ' Create a hexagon using a 'for' loop
      Turtle.Speed=10
      For sides=1 To 6
      Turtle.Move(100)
      Turtle.Turn(360/6)
      EndFor
      ' Create a square using a 'while' loop
      Turtle.Speed=10
      sides=0
      While sides

  • @Zxter
    @Zxter 2 роки тому +1

    Thank you so much. My stupid ass teacher has a weird ass accent and is really bad at giving examples so I don’t understand anything he says

  • @12_jawanza
    @12_jawanza 3 роки тому +1

    i did pause the video tried it from memory and total forgot to output the answer @_@.

  • @aashigaur9588
    @aashigaur9588 3 роки тому

    I have some questions can u PLZZ help me...🙏🙏🙏🙏

    • @TheTechTrain
      @TheTechTrain  3 роки тому

      What are your questions?

    • @aashigaur9588
      @aashigaur9588 3 роки тому

      @@TheTechTrain thanks for replying....I have 4 questions

    • @aashigaur9588
      @aashigaur9588 3 роки тому

      Write a program that read the number type value x that represents number in radian and a character type variable T that represents the type of function to be applied on x. The program should display
      a) sin(x) , if s and S is assigned to T
      b)cos (x), if c and C is assigned to T
      c) tan(x), if t and Ț is assigned to T
      Plz answer it ASAP 🙇‍♀️

    • @aashigaur9588
      @aashigaur9588 3 роки тому

      The equation
      x² + y²= r²
      Represents a circle with radius r and centre at its origin . Write a program which reads r and print the number of points with integer coordinated that lie within the circle .
      Plz answer it. ... I need to submit it tomorrow. ..

    • @aashigaur9588
      @aashigaur9588 3 роки тому

      Write a program to find GCD (greatest common integer) of two positive integers.
      Actually I have done it but I am not sure about it.. either it is correct or not....

  • @Konka1232
    @Konka1232 3 роки тому +1

    Mathematics and logical thinking are important for programming

    • @TheTechTrain
      @TheTechTrain  3 роки тому +1

      Absolutely, as is creative thinking and imagination.

  • @domy7773
    @domy7773 4 роки тому +1

    this was amazing but should have talked about it in the first episode

  • @rakhisabadra2557
    @rakhisabadra2557 4 роки тому +4

    Meere mortals

  • @multix5773
    @multix5773 3 роки тому

    you can do better by making a program that can write a table that you will say
    the program will be-num= TextWindow.Read()
    For i=1 To 12
    TextWindow.WriteLine(i + " times " + num + " is " + (i*num))
    endfor

    • @TheTechTrain
      @TheTechTrain  3 роки тому

      The idea of this tutorial series is to introduce new programmers to simple coding, rather than produce the most efficient code possible. Certain liberties or approaches have been used with that in mind