{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "What is your name: Tan\n", "How old are you: 34\n", "Tan will be 100 years old in the year 2080\n" ] } ], "source": [ "# ---------------------------------------------------------------\n", "# python best courses https://courses.tanpham.org/\n", "# ---------------------------------------------------------------\n", "# Create a program that asks the user to enter their name and their age.\n", "# Print out a message addressed to them that tells them the year that they will turn 100 years old.\n", "\n", "name = input(\"What is your name: \")\n", "age = int(input(\"How old are you: \"))\n", "year = str((2014 - age)+100)\n", "print(name + \" will be 100 years old in the year \" + year)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.13" } }, "nbformat": 4, "nbformat_minor": 2 }