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, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Who introduced the concept of combining artificial and natural light in the studio
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
Health, 26.01.2020 02:31
question
Chemistry, 26.01.2020 02:31
question
Mathematics, 26.01.2020 02:31
Questions on the website: 13722363