GoConqr has a new look! Let us know what you think.

Flashcards

Untitled

danyar hassan English 1 card

Cards in this deck (1)

  1. 1What does the following line of code do? SET result TO a * 5What does the following line of code do?
    SET result TO a * 5
    You said:
    Multiplies whatever is in the variable called 'a' by 5, and then stores the answer in a variable called 'result'
    Correct
    The * (asterisk) is the programming version of the multiply sign in maths. Thus this piece of code will take whatever is stored in the variable that is called 'a' and then multiply it by 5. Whatever the answer to this sum is then stored in the variable that is called 'result'. If the number 10 is stored in the variable 'a' then this code would multiply 10 by 5 and the answer (50) would be store in the variable called 'result.'
    2
    Which of the following lines of code would divide one variable by another variable and store the answer in another variable?
    You said:
    SET result TO a/b
    Correct
    The / (slash) is the programming version of the divide sign in maths. Thus this piece of code will take whatever is stored in the variable that is called 'a' and then divide it by b. Whatever the answer to this sum is then stored in the variable that is called 'result'. If t

Information

Description
Flashcards on Untitled, created by danyar hassan on 21/03/2018.
Created by
danyar hassan
Views
0
Rating

More on Operators and Boolean Logic

Feedback

What is it about?

What do you think of the new look?

How do you like it?