What part of computer science is this ?

These questions are examples of what we're currently taking in uni, I'm confused as to what we're doing and what this topic is called ?

The teacher said we were writing simple algorithms, what for ?

What's an algorithm ? Is this for the computer, an app, a program ? In real life who does this ? And if I want to solve problems like those in the picture, what can I look for on the internet ? What do I look up ?

Attachment image

7 Answers

  • Andy T
    Lv 7
    4 months ago

    It is either Computer Science 101 or Introductory Computer Programming, an "algorithm" is just fancy way of saying the "process" or "instruction steps". In short the professor want you to identify the variables and codify the mathematical process to arrive to the answer.

    • Login to reply the answers
  • roger
    Lv 7
    4 months ago

    An algorithm is like a recipe for making something. In math it is how you solve problems.

    It is a basic part of computer science. Like studying English and asking what are paragraphs for?

    Or being an automotive designer and asking what an engine does.

    • Login to reply the answers
  • 4 months ago

       Hi.  You can change the last 2 words to whatever You need to learn about quickly. not just these courses.


       And feel free to (mod)ify the searchterms I used, because the first 2 words can also be "teach yourself" or some other related combination.


    • Login to reply the answers
  • Me2
    Lv 7
    4 months ago

    That's middle-school arithmetic.

    • Login to reply the answers
  • How do you think about the answers? You can sign in to vote the answer.
  • 4 months ago

    The first 3 are numerical calculations, where you're expected to know that ^ is the "raised to the power" operation and "mod" is the modulo operator; and you're supposed to know the usual PEMDAS order of operations and that "mod" groups with multiplication and divison (equal priority, left to right.)

    The last two lines add some "Boolean" expressions: operations on values that are either true or false rather than on numbers. You need to know that ">=" means "greater than or equal to", that "<>" means "not equal to", and should know the rest (=, <, >, and <=). All of those comparisons act on numbers as operands and produce Boolean (true/false) results. The true Boolean operators are "and", "or" and "not"; and they've capitalized NOT for some strange reason.

    The extra order of operations rules are that arithmetic calculations are done first, then comparisons, then "not" operations, followed by "and" operations, and finally then "or" operations.

    Most of that notation is approximately that used in the Basic programming language.

    And, finally, there are no "algorithms" here. An algorithm is a procedure for computing something useful. The "long division" method you learned in grade school for dividing decimal numbers is an example of an algorithm. In modern computer science usage, there are more details and "computing" doesn't have to be about numbers. It's still the same idea. "If you follow these steps, repeating as directed, you will eventually arrive at the correct result."

    • Login to reply the answers
  • Chris
    Lv 7
    4 months ago

    This exercise is about basic logic and operator precedence.

    Everybody learns "point before line", i.e. multiplication/division before addition/subtraction.

    Powers have even higher precendence, and logic operators have the lowest.

    mod (modulo) is the remainder of the division, and has the same precendence as division.

    Let's look at the first example:

    3.6 + 9 mod (6*(3+2))/2 + 2^(3-2)*2

    3.6 + 9 mod (6*5) / 2 + 2^1*2

    3.6 + 9 mod 30 / 2 + 4

    3.6 + 9 / 2 + 4

    3.6 + 4.5 + 4 = 12.1

    The exercise apparently uses rigth-to-left precedence, so they do "mod" after "/" and get 9 mod 15 = 9 for the center term.

    The 4th and 5th are boolean expressions:

    2+3>1 and 5<>9/3 or 5+4=8

    The logic operators have the lowest precedence, and "or" is lower than "and".

    So we get

    5>1 and 5<>3 or 9=8

    (true and true) or false

    true or false


    An algorithm is a set of instructions intended to solve a problem, it usually has input and output.

    A basic algorithm for instance is calculating the GCD of two numbers. Like I explained in a previous question of yours: https://answers.yahoo.com/question/index?qid=20191...

    • Login to reply the answers
  • 4 months ago

    Time to speak to your teacher and tell him/her what you don't understand. They'll help.

    • Login to reply the answers
Still have questions? Get your answers by asking now.