Skip to content
Sign upLog in
← Back to Community
Let's learn Aardvark
Profile icon
hacker
has Hacker Plan
hg0428

Welcome to Aardvark, the language that has entranced programmers by its simplicity and amazingness for the last few days.

My goal is to by the end of this lesson have taught you the basics of the Aardvark language and get you on a course to become an amazing Aardvark developer.
In programming, you usually start with a Hello World program, but let's mix it up this time, lets start by learning how to write a program that takes the user's username as input and outputs a random welcome message. But first, we need to learn basic input and output.
This code will output This is my Aardvark program!:

output("This is my Aardvark program!")

You see, not that hard, now don't forget the quotes, it won't work right without them. Let's look at what this code does, output has parentheses, which means its a function, and then inside the quotes are the message that shows up on the screen. Hmm, I wonder if I can change what's in the quotes and it will change the message, lets try it:

output("This is a different message")

If you run that program you will see that it worked! Now let's learn how to take user input:

input("Enter your username: ")

If you run that code, you will see that it will give that message and then let you type in an answer. But how do we store that answer in our program? We use variables, variables store data for use later in the code. So if we add a = to the beginning of that then it will store the input in the variable a, lets try it:

a = input("Enter your username: ")

How do we know if it worked? Well, let's try to output the data inside a. Try this code:

a = input("Enter your username: ") output(a)

When you output variables, you don't need those quotes. Let's run it. When we run it, it will ask for our username and then output what we typed in. We can already get their username, we still need the random welcome message, lets first start with just a welcome message. If we output "Welcome, " before we output what they typed in, it would say Welcome, plus their username. Let's try it:

a = input("Enter your username: ") output("Welcome, ") output(a)

It worked! Let's simplify it, just do "Welcome, " + a instead of doing it on separate lines. Try this:

a = input("Enter your username: ") output("Welcome, " + a)

It worked! We now have our username input and our welcome message, but what about the random. How can we make it do something random?
In Aardvark, the tools module has some functions to help us do random stuff. But how do we include a module? Try this code:

#include tools

It makes all the functions in the tools module available in our program, lets add it to our code:

#include tools a = input("Enter your username: ") output("Welcome, " + a)

Now, what is the function to do random stuff? In Aardvark, you can use the randomchoice function from the tools module to make random choices. randomchoice takes a list of possible choices as its one argument. How do we make a list in Aardvark? Just put it in between [ and ] and separate the items by commas. Let's try this code:

#include tools username = input("Enter your username: ") message = randomchoice("Welcome, ", "Hello, ", "Have a good day, ") output(message + username)

It worked! We have reached our goal!

If you would like to continue learning Aardvark, watch for future tutorials, or go to our website.

Voters
Profile icon
RitaHardeman
Profile icon
Yoplayer1py
Profile icon
TheGM1
Profile icon
programmeruser
Profile icon
EpicRaisin
Profile icon
shineyPlayer
Profile icon
CodingWarrior
Profile icon
DynamicSquid
Profile icon
tinchovulta
Profile icon
dotcomboom
Comments
hotnewtop
Profile icon
dotcomboom

People here not knowing what Read the Docs and iframes are... :(

I'm not a Talk mod (just a fellow from the Discord) so I can't say for sure but I believe that hosting the docs there is fine, and it's very clear that you aren't making money off of it and I really don't get all the antagonizing.

So people don't get confused may I suggest instead of using an iframe, link to your Read the Docs site in a new tab? Of course, having the documentation on the repl.co site itself is fine too and means you wouldn't have to deal with ads. (That said, I have used RTD myself for my documentation in the past and it's very handy!)

You have a very fine project and I wish you best of luck in the competition.

Profile icon
HahaYes

STOP THE ADS

Profile icon
hg0428

We have to pay to do that.
I cant pay for the Gold Membership.


@HahaYes

Profile icon
HahaYes

@hg0428
wdym pay to do that can you explain a bit more?

Profile icon
hg0428

Yes, the company that hosts our documentation, https://readthedocs.io, has put ads on there and will not let us remove them without a gold membership.


@HahaYes

Profile icon
HahaYes

@hg0428
BRO ITS IN A REPL DOMAIN JUST REMOVE IT

Profile icon
hg0428

I am working on that, it could take a [email protected]

Profile icon
HahaYes

@hg0428
just delete the code

Profile icon
CodeLongAndPros

Please don't advertise on repl.

Profile icon
hg0428
Profile icon
CodeLongAndPros

@hg0428
There's ads in the website.

Profile icon
hg0428

Those are from readthedocs.io
Are we not allowed to use that site.
Its an iframe for readthedocs.io
Thats where our docs are hosted.


@CodeLongAndPros

Profile icon
HahaYes

@hg0428
yessir there are ads. Stop profiting off of others. There is a thing called your own domain :)

Profile icon
hg0428

We are not profiting. The place that hosts our docs put ads on there.


@HahaYes

Profile icon
k9chelsea2

is there no way to remove them?

Profile icon
HahaYes

@k9chelsea2
there are ways to remove them he just won't now he is ignoring us

Profile icon
hg0428

I am, I am working on it.
To remove them I have to pay for gold membership.
So I have to remake it in a repl.


@HahaYes

Profile icon
HahaYes

This man has a bigger ego than me smh

Profile icon
HahaYes

WAIT
WHY DO I SEE ADS

NONONONONO

Profile icon
hg0428

We did not put any ads on it.

@HahaYes

Profile icon
hg0428

We are not going to pay to remove ads. You can pay for it if you want.


@HahaYes

Profile icon
HahaYes

@hg0428
WHAT, ARE YOU SERIOUS THIS IS AGAINST RULES REMOVE THEM

Profile icon
hg0428

We can't, we have no ads to remove.

@HahaYes

Profile icon
HahaYes

@hg0428
yeah... I'll go call Codelong over

Profile icon
hg0428

Ok. WE HAVE NO ADS. Its Readthedocs.io that has the ads


@HahaYes

Profile icon
HahaYes

@hg0428
yes you do

Profile icon
Wuru

Mad cus bad

@HahaYes

Profile icon
HahaYes

@Waku
is this wuru

Profile icon
Wuru
Profile icon
PYer

You're putting ads on your repls?

Profile icon
hg0428
Profile icon
HahaYes

@PYer
IKR HERESY

Profile icon
PYer

excuse me?

@hg0428

Profile icon
hg0428

We are using https://readthedocs.io to host our documentation. They require a gold membership to remove [email protected]

Profile icon
HahaYes

@PYer
wait what now you deny ads? What

Profile icon
PYer

Use repl.it to host...

@hg0428

Profile icon
hg0428

I've been switching over, it could take a while.


@PYer

Profile icon
HahaYes

@hg0428
bro you are hosting on repl. Can't you see a repl.co?

Profile icon
PYer
Profile icon
hg0428

I know, but our documentation is on readthecods.io
We have an iframe in the [email protected]

Profile icon
PYer

Ah... Interesting...

@hg0428

Profile icon
HahaYes

@hg0428
just delete it

Profile icon
PYer

No. It's beyond his abilities rn. After he hosts it on repl.it (and I mean with the majority of code, not with the iframe to readthedocs that he currently has), he'll be able to remove ads. He is not making a profit off of the advertisements, and moderators have deemed it appropriate.

@HahaYes

Profile icon
GameWinner6025

Wow, you have a tutorial too?
This is amazing!

Profile icon
theamazingplant

Thank you for the tutorial!

Profile icon
HahaYes

nice project... I was confused by the ads...

Profile icon
jackou

Nice. Clean up the website, though, it's bright on the eyes. :/

Profile icon
AmazingMech2418

image
Do you make money from the advertising? This says that you can try it for free with $60 credit...

Profile icon
hg0428

No. We have to pay to remove [email protected]

Profile icon
Codemonkey51

I think that's to buy an ad....

@AmazingMech2418

Profile icon
hg0428

No, it says it on [email protected] , I do not want to have this conversation all over again. Read all the other comments to get and answer for your question, I recommend that you read ALL of them.

Profile icon
hg0428

Also, try making a project yourself on readtheroics.io, you have to have the gold membership to remove ads from your project.

@Codemonkey51

Profile icon
Codemonkey51

I have ik that you have to get gold to remove ads I'm just saying I think the $60 credit is to BUY ads

@hg0428

Profile icon
k9chelsea2

maybe you can hot the docs on a different site there are also free domains you can use without having ads i dont think they are allowed on replit

Profile icon
hg0428

I am switching [email protected]

Profile icon
k9chelsea2

oh ok nice

Profile icon
HahaYes

its a repl.co domain. Its "owned" by repl

Profile icon
CodingCactus

pythonCode.replace('print', 'output').replace('import', '#include')
That's what I'm seeing

Profile icon
hg0428

Not close. There is a big difference, look at our docs: https://aardvark-website.programit.repl.co/docs/latest/index.html

@CodingCactus

Profile icon
CodingCactus

@hg0428
sorry but you aren't allowed to have ads on repl.it hosted sites. Also what is that margin!!?? SO MUCH WHITESPACE! Also the text isn't in the center of the screen lmao. And two scroll bars???

Profile icon
hg0428

What ad? What do you mean the text is not at the center?


@CodingCactus

Profile icon
CodingCactus

@hg0428
don't bully the handwriting
image

Profile icon
hg0428

We did not add the ads, that is an iframe.

@CodingCactus

Profile icon
CodingCactus

@hg0428
its an ad

Profile icon
hg0428

In an iframe.
It will be fixed as soon as we can.


@CodingCactus

Profile icon
CodingCactus

@hg0428
I don't care what html tag it is, it is still advertising something

Profile icon
hg0428

It will be fixed as soon as possible.

@CodingCactus

Profile icon
hg0428

Plus, the add was already there before we even made the website, we did not put any ads on [email protected]

Profile icon
CodingCactus

@hg0428
how do you make a website and not realise you have put ads on it?

Profile icon
hg0428