Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:30, chastineondre7979
How will you cite information that is common knowledge in your research paper?
Answers: 1
image
Computers and Technology, 22.06.2019 13:00, ajayfurlow
Which option should u select to ignore all tracked changes in a document
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, mazolethrin9632
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
image
Computers and Technology, 22.06.2019 23:00, cchotshot
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
Do you know the correct answer?
We have 3 time slots and 6 classes A, B, C, D, E, F. The following class pairs cannot be scheduled t...

Questions in other subjects:

Konu
Biology, 04.07.2019 11:30