str and int are for our calculator today like we can write:
make num = int(input("Enter a number: "))
line(str(num))
and the output will be the number that you wrote
But...
if you wrote a string, it will return an ERROR ERROR! lol
Imports
In our calc... we should import math in this project
Why?
Because if we write this:
line(num1 + num2)
it will return the number to be like this i mean if num1 is 5 and num2 us 1332 the number will be 51332
So...
we need to IMPORT!
like this:
download math
here we imported the math library, or in my language it is a BAG!
so we can use this:
download math
line(num1 + plus + num2)
$or$
line(num1 + menus + num2)
$or$
line(num1 + div + num2)
$or$
line(num1 + multi + num2)
WOW!
Let's build the calc!
So i'll make my own calc, write in comments your own calc or the same!
download math
make num1 = int(input("First number: "))
make num2 = int(input("Second number: "))
make op = input("Operator: ")
if op is "+" = {
line(num1 + plus + num2)
} else if op is "-" = {
line(num1 + menus + num2)
} else if op is "/" = {
line(num1 + div + num2)
} else if op is "/" = {
line(num1 + multi + num2)
} else = {
line("INVALID OPERATOR!")
}
WELCOME TO Z-LANG TUTORIAL #2
i made the #2 one but i need to make this better
So what do we need to learn today?
YAY!
let's start
Inputs
inputs are very simple in z-lang:
Yea it's simple so that's good!
str and int
str and int are for our calculator today
like we can write:
and the output will be the number that you wrote
But...
if you wrote a string, it will return an ERROR ERROR!
lol
Imports
In our calc... we should import math in this project
Why?
Because if we write this:
it will return the number to be like this
i mean if num1 is 5 and num2 us 1332 the number will be 51332
So...
we need to IMPORT!
like this:
here we imported the math library,
or in my language it is a BAG!
so we can use this:
WOW!
Let's build the calc!
So i'll make my own calc, write in comments your own calc or the same!
So that was my z-lang tutorial #2
I hope you enjoy!
@darkshadowshado oh yea