ADVERTISEMENT

Observe the code and identify the outcome (5)

14. Observe the code and identify the outcome:

from numpy import random

x = random.binomial(n=100, p=0.5, size=10)

print(x)
  1. [41 53 50 52 60 47 50 50 50 46]
  2. [50 52 60 47 50 50 50 46]
  3. [41 53 50 52 60 47 50]
  4. None of the mentioned above

Answer: A) [41 53 50 52 60 47 50 50 50 46]

Explanation:

In the above code, binomial distribution has been used so the outcome of the code will be [41 53 50 52 60 47 50 50 50 46].

Comments and Discussions!




ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.