+ 1

What are tabs in python?

I've looked everywhere and can't figure that out.

19th Aug 2018, 4:20 PM
Matthew Molski
Matthew Molski - avatar
9 Respostas
+ 3
matt there are so many problems in the code, I think I would agree with Markus Kaleton suggestion for you to continue learning the lesson first. So far, these are what I've found: - You use slanted single & double quotes, this should be changed to standard single & double quotes. - You put colon after elif, this isn't right, colon should be at the end. - All your code are aligned on the same level, you need to understand the concept of code indentation, it's crucial in Python. So there, the things you need to put some fixing time into, don't fall back now, keep moving on : )
19th Aug 2018, 8:35 PM
Ipang
+ 2
matt save your code in your profile, and attach its URL in your question's Description section. In case you don't know yet how; open your code in Code Playground editor, you'll see a share button up to the top right side, tap on it, and pick a menu that suggests to copy to clipboard. Next, edit your question, and paste it in Description section.
19th Aug 2018, 7:19 PM
Ipang
+ 1
Hello matt can you please tell more about it, like where you saw it, is it in the lesson's chapter, how it is phrased in the sentence, it's kinda difficult to answer because 'tabs' is a contextual word : )
19th Aug 2018, 5:14 PM
Ipang
+ 1
my code wasn't working so I asked how to make it work than the person told me that I need a tab
19th Aug 2018, 7:15 PM
Matthew Molski
Matthew Molski - avatar
+ 1
ok but my code isn't working it still it gives an error sign
19th Aug 2018, 7:21 PM
Matthew Molski
Matthew Molski - avatar
+ 1
I'll post the error sign and code
19th Aug 2018, 7:21 PM
Matthew Molski
Matthew Molski - avatar
+ 1
I'll post it here
19th Aug 2018, 7:24 PM
Matthew Molski
Matthew Molski - avatar
+ 1
while true: print(“Options:”) print(“Enter ‘add’ to add two numbers together”) print(“Enter ‘substract’ to substract from a number”) print(“Enter ‘multiply’ to multiply a number”) print(“Enter ‘divide’ to divide a number”) print(“Enter ‘quit’ to quit the program”) if user.input == “quit”: break elif: user.input == “add”: num1 = float(input(“Enter a number:”)) num2 = float(input(“Enter another number:”)) result = str(num1 + num2) print (“the answer is ” + result) elif: user.input == “substract”: num1 = float(input(“Enter a number:”)) num2 = float(input(“Enter another number:”)) result = str(num1 - num2) print (“the answer is ” + result) elif: user.input == “multiply”: num1 = float(input(“Enter a number:”)) num2 = float(input(“Enter another number:”)) result = str(num1 * num2) print (“the answer is ” + result) elif: user.input == “divide”: num1 = float(input(“Enter a number:”)) num2 = float(input(“Enter another number:”)) result = str(num1 / num2) print (“the answer is ” + result)
19th Aug 2018, 7:24 PM
Matthew Molski
Matthew Molski - avatar
+ 1
There is so much wrong with the code that i highly recommend you take the python lesson here on sololearn
19th Aug 2018, 8:05 PM
Markus Kaleton
Markus Kaleton - avatar