Sublime Forum

Some python functions are not working

#1

The functions, at least until now, that are not working for me are floor, ceil and sqrt.
The rest of the text you can ignore, it´s just I am going in a tutorial

0 Likes

#2

Python is indentation sensitive. The whitespace you have before your print function calls is causing an error. It’s also helpful to read the error message that python gives you in the console output, eg:

  File "test.py", line 2
    print('foo')
    ^
IndentationError: unexpected indent
0 Likes

#3

Since I’m new at this, I couldn’t understand your explanation, if you could explain it to me in an easier way I would appreciate, and I you will leave another image

0 Likes

#4

If you take a look at documentation about python’s floor function, you’ll find it’s in the math module: https://www.tutorialspoint.com/python/number_floor.htm. The best way to find out these things is to look at the error message (“Traceback…” in the console at the bottom) and do an online search, or simply look up “python ceil”.

0 Likes

#5

oh i got it, thank you, appreciate it

0 Likes

#6

Hi, I am back cuz my input function just doesn´t work and I don´t know how.
E.g.: name = input('Enter your name: ')
print('Hello ’ + name)

And then when it shows me in build I put the name and doesn´t print anything.

0 Likes

#7

The basic answer to that lies in this post :-


but looking at your previous posts, it seems you are an absolute beginner to programming. You might want to actually learn how to try using a proper terminal (like command prompt in Windows, bash on linux/macos) to execute your programs. Once you can properly execute scripts in an external terminal, you can better understand how to use Build systems.

3 Likes

#8

I am still trying to make a sepate build to pop up, it isn´t working.

0 Likes