Jump to content

Guess the Language

- - - - -

  • Please log in to reply
11 replies to this topic

#1
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
Hi, First of all I am new to the programming world, I am currently studying bachelor of multimedia at university and one of my subjects is programming I and we have started using a programming language called ACL.

But I just cannot find any tutorials or books to help me understand this language. So I am thinking it is called something different.

Here is some of the coding types I Have been using. PLEASE SOMEONE out there HELP. I got 1% on a 5% exam :crying:

Problem: Write an algorithm that reads 3 integers and prints the largest one.

Solution:

algorithm largest
{int largest, n2, n3;

read(largest, n2, n3);

if (n2 > largest)
largest = n2;

if (n3 > largest)
largest = n3;

print(largest);
}

Example 2:

Problem : Given a number n, compute n factorial (written as n!) where n >= 0. The number n will be input by the user of the algorithm.

algorithm factorial
{int i, n, result;
read(n);
result = 1;
for (i = 1; i <= n; i = i + 1)
result = result * i;
print(result);
}

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Odd I had heard of ACL before, but can find absolutely nil on what it is (Audit Command Language?). What you wrote is much like C, I could translate them directly and they appear to function fine based on what the assignment gives you. Do you have any guidelines of your assignment or why you got the score you did?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
Well at university we call it Algorithmic computer language and we will be using it for java and my score was a lovely 1% out of 5% hahahaha...It's cos i do not have a clue what is going and my tutor and my lecture does not really care >.<

I just cannot find any books to help me how to understand it and why we do the things we do.

#4
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
I am looking at C languages. its similar but not, They said it is a form of pseudo code and we should use flowcharts etc. I just wish I knew what coding this is, so then I can do good on my other exams.

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Back up a second. Does it have a compiler or interpreter so you can validate that it works? What command do you use to invoke it?

Do you have a text book for this language? Do you have any additional keywords?

My concern is that this could be a formalized version of pseudocode with some nonsense name tacked onto it to make it sound official. This is reinforced by the fact that when I search for "list of programming languages", I do not find ANYTHING related to it.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
Okay answer first question
1. We just write it in notepad++
2. We have learned If statements, if-else, while, do-while, Loops and Array statements
3. we use words like read and print
4. We have NO text books (only textbook we got was for java)


So basically I just have to keep reading over my lecture notes and just pray my head soaks it in??

#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
I have a feeling the A in ACL stands for something like "Abstract". I was not able to find an ACL that uses "algorithm" as a keyword. With that said, if this is basically a formalized pseudocode, we can still help you with the logic, and you can make sure the syntax is correct for what your teacher has provided.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
Thank you so much for your help.

I have probably one main question.

"What is the best way to learn a language?"
-writing it over and over again?
- Flow charts?

I would love to be a programmer, I know this much, the language we are doing is just a language to help to support java. So all it is breaking it down in easy manageable bits.

Thank You So Much for helping me.

I am going to attempt learning it again and then if I have some questions. I will ask them.

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
There are books on programming logic that may be helpful. They may help.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
Hi all,

Sorry to knew this thread but I have a few questions, I know we have worked out this language is slightly made up. But if you could help me understand some sections that we use in our algorithms would be wonderful

what does int mean?

example
{int largest, n2, n3;

Another question..
Why do we need to tell the computer/algorithm that the count and total is 0

{int total, count, number;
total = 0;
count = 0;


also another question based around the above one. When do we have to tell the computer that count and total is 0?


I have another exam this week. Hopefully I can more than 1%

#11
Smilex

Smilex

    Learning Programmer

  • Members
  • PipPipPip
  • 84 posts
Do your teachers expect you to figure it all out yourselves? Why don't they explain these things?
int is a shortened version of the word integer. An integer is a type that stores number without any floating point numbers. 15 is an integer, 15.5 is not.
when you tell your variables to be = 0, you are initializing them. It's to make sure they don't contain rubbish data.

#12
jessiejester

jessiejester

    Newbie

  • Members
  • Pip
  • 7 posts
I dunno, why they don't explain it. They are probably just caught up with the fact that they are a professor and doctors. It annoys me allot that they are assume we get it but the worst thing they had a special tutorial for people who did not get it and sent it out at the time the tutorial was on not a few days before. So only two people showed up so now they wont help anyone.

BUT i thank everyone on this forum helping me, it means the world to me :D




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users