+ 1

Define

def greet(): print("Hello from a function") print("Have a great day") my question is,:does def function need indentation or not??

6th Aug 2024, 5:12 PM
Rouza TN
Rouza TN - avatar
3 Réponses
+ 5
You are creating a lot of questions. Read the lessons carefully. Do not proceed before having read the lesson. Test the code. Modify it. Observe what changes in the output and what does not. Write code. First, try to find an answer yourself, then create a thread. Don't rush; take as much time as you need.
6th Aug 2024, 5:40 PM
Lisa
Lisa - avatar
+ 4
Rouza only if the def is inside another function otherwise no def greet(): Then the block of code you intend to use here.
6th Aug 2024, 5:22 PM
BroFar
BroFar - avatar
+ 2
def greet(): print("Hello from greet") def bye(): print("Hello from bye") bye() greet()
7th Aug 2024, 2:13 AM
Bob_Li
Bob_Li - avatar