# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Explanation: Copyright 2017 Google LLC.
End of explanation
"""


from __future__ import print_function

import tensorflow as tf
try:
  tf.contrib.eager.enable_eager_execution()
except ValueError:
  pass  # enable_eager_execution errors after its first call

tensor = tf.constant('Hello, world!')
tensor_value = tensor.numpy()
print(tensor_value)

"""
Explanation: Prework: Hello World
Learning Objective: Run a TensorFlow program in the browser.
The code block below is a "Hello World" TensorFlow program.
It consists of initialization code (importing tensorflow module and enabling "eager execution", which will be covered in more detail in subsequent exercises) and printing a "Hello, world!" string constant.
End of explanation
"""


