subject

We have 3 time slots and 6 classes A, B, C, D, E, F. The following class pairs cannot be scheduled together (A, B),(A, C),(A, D),(B, E), (C, E),(C, D),(D, F),(B, F). For each class, there are three variables. For example, for class A, there are a1,a2 and a3. If a1=True this means that class A is scheduled in period 1. Write all your functions in the following parts in python. In each part, make sure that the names of your functions match the names of the functions that we are asking you to write. Note that for each part you can call functions from previous parts. There are two sets of test cases. The autograder on Gradescope will only reveal the results of one set of cases. You will not know the results of the other set of test cases. This is done to encourage you to test your own code. Required:
a. Define a function no MoreThanOnce(x1,x2,x3) that outputs True if the class X is scheduled no more than once. The first line in your code should be def noMore Than Once(x1, x2, x3)
b. Define a function at Least Once(x1,x2,x3) that outputs True if the class X is scheduled at least once. The first line in your code should be def at least once(x1, x2, x3)
c. Define a function exactlyOnce(x1,x2,x3) that outputs True if the class X is scheduled exactly once.
d. Define a function different Timeslots(x1,x2,x3,y1,72.y3) that outputs True if two classes X and Y are scheduled in different time slots.
e. Define a function is ItValid(ai, a2, a3, b1,b2, 53, c1, c2, c3, di, d2. d3, el. e2, e3, f1, f2, f3) that outputs True if the schedule is valid for classes A, B,C, D,E, and F.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 06:20
What is a point-in-time measurement of system performance?
Answers: 3
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
You know the right answer?
We have 3 time slots and 6 classes A, B, C, D, E, F. The following class pairs cannot be scheduled t...
Questions
question
Physics, 28.08.2020 14:01
question
Advanced Placement (AP), 28.08.2020 14:01
question
Mathematics, 28.08.2020 14:01
Questions on the website: 13722362