0

There is error coming in my code I've tried 4 times...but it's still telling invalid syntax

https://code.sololearn.com/cWaRkGzX3S92/?ref=app

18th Jul 2020, 8:02 AM
blooming Flowers
blooming Flowers - avatar
3 Antworten
+ 5
1. Mind code indentation, code indentation is very important in Python. 2. Function name may not contain spaces, look at your function name and replace spaces by underscores. 3. You forgot to put assignment operator in your <result> variable definition.
18th Jul 2020, 8:11 AM
Ipang
+ 2
def divisible_by_3_and_5(num): result=[] for i in range(num): if i%3==0 and i%5==0: result.append(i) return result num=int(input("my number\n")) result=divisible_by_3_and_5(num) print(result)
18th Jul 2020, 9:01 AM
Abhay
Abhay - avatar
0
Ok
18th Jul 2020, 8:43 AM
blooming Flowers
blooming Flowers - avatar