Logo

Go on. Explore!

lvl 0 • 0 xp

lvl 1

HomeMarketDecksInterests

Sameer Md

lvl 1 • 4 xp

lvl 2

Activity

Mon

Wed

Fri

Aug

Sep

Oct

Nov

Dec

Jan

Feb

Mar

Apr

May

Jun

Jul

Decks by Sameer Md (3)

pythonpythonfrom functools import reduce num = int(input("num: ")) fib = lambda n: reduce(lambda x, _: x+[x[-1]+x[-2]],range(n-2), [0, 1]) print(fib(num)) num: 7 [0, 1, 1, 2, 3, 5, 8]
Star 0%
Star 0%
Star 0%
Star 0%
Star 0%
(0)
(1)(1)
grfersgsgrfersgsfefrefeclass Gen<T>{ T ob; Gen(T ob1){ ob = ob1; } void disp(){ System.out.println("ob = "+ob); } void showType() { System.out.println("Type of T: " + ob.getClass().getName()); } } public class Methods_Const_inGenerics { public static void main(String args[]){ Gen<Double> a = new Gen<Double>(10.3); a.disp(); a.showType(); } }
Star 0%
Star 0%
Star 0%
Star 0%
Star 0%
(0)
(1)(1)
sddssddsfsdfreervfsfclass Gen<T>{ T ob; Gen(T ob1){ ob = ob1; } void disp(){ System.out.println("ob = "+ob); } void showType() { System.out.println("Type of T: " + ob.getClass().getName()); } } public class Methods_Const_inGenerics { public static void main(String args[]){ Gen<Double> a = new Gen<Double>(10.3); a.disp(); a.showType(); } }
Star 0%
Star 0%
Star 0%
Star 0%
Star 0%
(0)
(1)(1)