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 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
To maintain clarity and focus lighting might be needed
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
Answers: 3
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
Mathematics, 02.03.2021 18:50
question
Physics, 02.03.2021 18:50
question
Mathematics, 02.03.2021 18:50
question
Arts, 02.03.2021 18:50