Answered step by step
Verified Expert Solution
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
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 - FalseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started