| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Variables"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Variables are used to store data that can change over time"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "1\n"
- ]
- }
- ],
- "source": [
- "i = 1 # create an interger \n",
- "print(i)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Hello\n"
- ]
- }
- ],
- "source": [
- "s = \"Hello\" # create a string\n",
- "print(s)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "1.1\n"
- ]
- }
- ],
- "source": [
- "f = 1.1 \n",
- "print(f)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<a href=\"http://localhost:8888/notebooks/03.Maths.ipynb\">Previous maths</a> \n",
- "<a style=\"float:right;margin-right:10em;\" href=\"http://localhost:8888/notebooks/05.input.ipynb\">Next input</a> "
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.0"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
|