- 1

a=(lambda x:x*(x+1))_ print(a) How do I call 6 to the above code?

25th Sep 2016, 4:03 AM
Shankar Balasubramaniam
Shankar Balasubramaniam - avatar
10 Answers
+ 1
The 6 just needs to be placed into brackets a=(lambda x:x*(x+1))(6) print(a)
27th Mar 2018, 8:01 PM
Alexander Johansen
Alexander Johansen - avatar
0
Fill in the blanks to take the numbers from the list while they are even, using the takewhile function. from itertools takewhile nums = [2, 4, 6, 7, 9, 8] a = ( x: x%2==0, nums) print(list(a))
28th Apr 2018, 8:05 AM
H Alayed
H Alayed - avatar
- 1
class Student def __init__(self, name): self.name = name sayHi( ): print("Hi from "+ .name) s1 = Student("Amy") s1.sayHi()
25th Jun 2019, 9:05 AM
Elvin
- 1
Fill in the blanks to create a class with a method sayHi(). class Student : def __init__(self, name): self.name = name def sayHi( self ): print("Hi from "+ self .name) s1 = Student("Amy") s1.sayHi()
28th Apr 2020, 9:38 AM
makhan Kumbhkar
makhan Kumbhkar - avatar
- 1
import takewhile lambda
1st Jun 2020, 4:02 PM
Frederick John Suerte
Frederick John Suerte - avatar
- 1
Thanks all
9th Jun 2020, 3:55 AM
Waled Moumari
Waled Moumari - avatar
- 1
class Student: def __init__(self, name): self.name = name def sayHi(self): print("Hi from "+self.name) s1 = Student("Amy") s1.sayHi()
7th Aug 2020, 8:48 AM
SANDEEP KUMAR
SANDEEP KUMAR - avatar
- 1
class Student : def __init__(self, name): self.name = name def sayHi( self ): print("Hi from "+ self .name) s1 = Student("Amy") s1.sayHi()
4th Oct 2020, 9:54 AM
HAMZA AOUNI
HAMZA AOUNI - avatar
- 2
Fill in the blanks to create a class with a method sayHi(). class Student : def __init__(self, name): self.name = name def sayHi( self ): print("Hi from "+ self .name) s1 = Student("Amy") s1.sayHi()
18th Sep 2019, 10:47 AM
pooriya hosseini
pooriya hosseini - avatar
- 3
put (6) in place of underscore
25th Sep 2016, 4:41 AM
Shankar Balasubramaniam
Shankar Balasubramaniam - avatar