def CartesianProduct(A,B):
lst = []
for x in A:
t = []
t.append(x)
for y in B:
temp = []
for x in t:
temp.append(x)
temp.append(y)
lst.append(temp)
return lst
A = ['a','e']
B = [1,3,7,9]
print(CartesianProduct(A,B))

![a, 1, [a, 3], [a, 7], [a, 9], [e, 1], [e,3], [e, 7], [e, 911 Process finished with exit code 0](http://img.homeworklib.com/questions/703b6a50-b80f-11ea-a6ab-fba5d7783f3c.png?x-oss-process=image/resize,w_560)

Implement in Python 2. Develop the following python program. Implement Cartesian production of two sets. For...
u are to write a program in Java that takes two sets of up to 5 symbols(letters, numbers or any characters) and prints the cartesian product of the two sets. The program should allow the user to enter the characters for each set and the output should, consist of the name of each set followed by the characters and on the following line print the cartesian product. Example: {1,3,*} X {3,?,D} = {(1,3),(1,?),(1,D),(3,3),(3,?),(3,D,(*,3),(*,?),(*,D)} or {2,3,5,7} X (5,6} = {(2,5),(2,6),(3,5),(3,6),(5,5),(5,6),(7,5),(7,6)}
PYTHON Description: Develop a Python program that asks for two positive integers, including zero and displays all the numbers generated using the Russian multiplication method. The Russian multiplication method consists in successively multiplying by 2 the multiplying and dividing (integer division) by 2 the multiplier until the multiplier takes the value 1. In the process, all the multiplicands corresponding to the odd multipliers are added. This sum is the product of the two numbers. The first integer will be the...
Develop a complete C++ program to perform the following tasks: - Implement a function that takes three parameters (x, y, z). It calculates minimum of x and y, and keeps the result in z. Return type of this function is void. - Implement a function that takes three parameters (x, y, z). It calculates max of x and y, and keeps the result in z. Return type of this function is void. - Implement a function that takes three parameters...
write a java program that will perform the following. Given two finite sets, list all elements in the Cartesian product of these two sets. Given a finite set, list all elements of its power set.
Subject: Management information technology (python) Write a program (script mode) that first sets x to a string with the character 2, y to the value 3, and z to the value 23.3. Using the type function, the program must display the type of each of the following expressions: x y z y+z
PLEASE DO THIS IN PYTHON!!!!!!!! 1.) For each lab program you develop, make sure to include the following header - replace the dots with your section #, semester, your full name, your instructor’s name, and lab #: Class: CSE 1321L Section: ... Term: ... Instructor: ... Name: ... Lab#: ... Make sure to put the correct comment character(s) before the above lines in each file. C# & Java use // for comments, Python uses a # Exercise #1:...
In Python 3, Implement a program that directs a cashier how to give change. The program has two inputs: the amount due and the amount received from the customer. Display the dollars, quarters, dimes, nickels, and pennies that the customer should receive in return. In order to avoid roundoff errors, the program user should supply both amounts in pennies, for example 526 instead of 5.26. Enter the amount due in pennies: 828 Enter the amount received from the customer in...
Write a Python program to implement Newton's method to estimate √12.
Program has to be in C# language
Write a computer program that takes two sets (let the user determine the cardinality of each set and enter them manually) and calculates the following operations: Union Intersection Difference (set1 - set2) Cartesian product (set2 X set1) Check whether set2 is a subset of set1 or set1 is a subset of set2 Find the powerset of set1 and print out its elements and cardinality
Give a problem statement that requires you to develop a Python program that meets the following requirements (2 EC points) The program reads data from a text file and then assigns it to a string variable (2 EC points) The program defines and calls at least one function other than main() (2 EC points) The program uses a multi-way branch (if, followed by a number of elifs, followed by else) (2 EC points) The program uses a loop (for loop...