Computer

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/5

flashcard set

Earn XP

Description and Tags

QB64 - Programming statements

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

6 Terms

1
New cards

Loop/Iteration

process of repetition in programming

2
New cards

For...Next

  • to perform a loop specific no. of times

  • uses a counter variable jo is increased or decreased

  • Syntax:

    For counter variable = Start Value To End Value Step

    Print whatever

    Next counter variable

  • For = beginning of loop

  • StartValue = actual value of variable

  • EndValue= value the variable shd reach to end the loop

  • StepValue = amount by which the variable changes after each loop

  • Next = ends the loop

3
New cards

DO WHILE… LOOP

  • performed as long as the given statement is true

  • Before the loop is ended, counter variable shd be increased/decreased

  • When step value is missing, it becomes an infinite loop!

  • Syntax Example

    assign value to variable. a = 1

    Do while test condition Do while a<=10

    Statement 1 print a

    Statement 2 a = a+1

    Loop Loop

4
New cards

DO UNTIL…LOOP

  • executed until a certain condition is met

  • If,

    statement false = executed

    statement true = stops executing

  • Syntax

    DO UNTIL test condtion

    Statement 1

    Statement 2

    LOOP

5
New cards

WHILE…WEND

  • executes a series of statements until the condition is true

  • Syntax

    WHILE test condition

    Statements

    WEND

6
New cards

EXIT

  • Used to come out of a loop before the expected no. of times

  • Generally followed by IF