#Program 2, Placeholder Tensorflow

import tensorflow as tf 

x1 = tf.placeholder(dtype = tf.float32, shape = None)
y1 = tf.placeholder(dtype = tf.float32, shape = None)
z1 = x1 + y1

x2 = tf.placeholder(dtype = tf.float32, shape = None)
y2 = tf.placeholder(dtype = tf.float32, shape = None)
z2 = tf.matmul(x2, y2)
 
with tf.Session() as sess:
	#When only one operation to run
	z1_value = sess.run(z1, feed_dict = {x1: 1, y1: 2})

	#When run multiple operations
	z1_value, z2_value = sess.run([z1, z2], feed_dict = {x1:1, y1:2, x2:[[2, 2]], y2:[[3], [10]]})

	print(z1_value)
	print(z2_value)