Write a python function to simulate selecting n people

Assignment Help Assembly Language
Reference no: EM132360999

Question

The Birthday Paradox states that if 23 people are selected at random, there is better than 50% chance that at least two of them will have the same birthday (not considering the birth year).

You are to write a Python function to simulate selecting n people at random and checking the probability of having at least two people with the same birthday.

You should ignore the leap years and assume 365-day years.

To be more specific, devise a Python function, call it bdpd(n,k), that once invoked, will select n numbers with replacement from the set of numbers 1 through 365 inclusive, determine if two or more of the numbers selected are the same (call it a hit), and repeat this task k times, and finally return the percentage of hits.

Reference no: EM132360999

Questions Cloud

How will your communication strategies change for each group : Describe one internal and one external method for the dissemination of your EBP project results(the effects of inadequate nurse staffing on patient care).
Write a program to find the longest open reading frame : You should provide a proper README file including introduction to your script, error handling, simple explanation to your input and output files.
What additional aspects mangers and leaders need to initiate : Discuss what additional aspects mangers and leaders would need to initiate in order to ensure professionalism throughout diverse health care settings.
Unusual consumption of computing resources : Discuss four types of incident candidates that are considered to be possible actual incidents: Unusual system crashes.Unusual consumption of computing resources
Write a python function to simulate selecting n people : Write a Python function to simulate selecting n people at random and checking the probability of having at least two people with the same birthday.
Battery-powered remote-control cars : Should the law be interpreted to forbid motorcycles, bicycles, children's pedal cars, and battery-powered remote-control cars.
Perform a comparative analysis in freedom vs predestination : Freedom vs. Predestination Perform a comparative analysis that reflects the difference between freedom and predestination.
Review the YITSC case study and prepare an event table : ICT310 Systems Analysis and Design Assignment, University of the Sunshine Coast, Australia. Review the YITSC case study and prepare an event table
Suggest improvements or ask follow-up questions : Evaluate?the pros and cons of their proposals, and when applicable, suggest improvements or ask follow-up questions.

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd