Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

fill in the banks to complete the code 2. Function. By filling in the blanks below, write a Python algorithm that first defines a variable

image text in transcribed

fill in the banks to complete the code

2. Function. By filling in the blanks below, write a Python algorithm that first defines a variable holding the number of students in the class, and then creates a vector of integers between and 364 that represent random birthdays for the students in the class. Then, the algorithm should go through the class and check whether each person has the same birthday as someone else in the class. The variable 'match should be set to True when the first matching birthday is found and do not double check students le, if you checked whether or not student 3 and student 5 had the same birthday, you should not later check if student 5 has the same birthday as student 3. Note that there are 7 blanks (3 points each) import numStudents - 25 birthdays = numpy.random.randint(0, 364, size- match = False for i in range for 1 in range numStudents): if birthdays[i] birthdays [3] print(1, "matched with". ) = True match - False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago