Answer:
import random
def calc_birthday_probability(num_people):
num_tries = 1e6
num_duplicates = 0
tries = 0
while tries < num_tries:
total_birthday = {}
for i in range(1, 366):
total_birthday[i] = 0
for count in range(num_people):
birthday = random.randint(1, 365)
if total_birthday[birthday] != 0:
num_duplicates += 1
break
total_birthday[birthday] += 1
tries += 1
return num_duplicates/num_tries
def main():
num_people = 10
p = calc_birthday_probability (num_people)
print(p)
num_people = 20
p = calc_birthday_probability (num_people)
print(p)
return
if __name__ == "__main__":
random.seed(2020)
main()
Explanation:
-
Run the loop until the value of tries is less than num_tries to do number of trials.
- Run the loop to create the desired number of birthdays by generating random numbers.
- Increase the num_duplicates variable by 1, if the birthday has already occurred.
- Lastly define and then call the main function.
Answer:Go to photos and select albums, there you should see the plus sign on the top left and tap that and you should be able to create a video/photo album
Explanation:
You have to go to photos and select the blue plus sign
it mean for some people that have technology like a computer and there are some who don't have access to technology like phones, and tv's
Answer:
Windows slideshow.
Explanation:
Creating or displaying a collection of images in a windows file can be very ecstatic and it is quite possible using third party applications.
One way of creating a slideshow is using the screensaver desktop option. There are other easy ways like the wallpaper option and using powerpoint presentation.
To using the screensaver option, go to windows settings and click on personalize, here, use can select a theme or a group of image files, click on a color theme and click apply.