CoolFace
Apppublic

Rafa1986/Data-Analytics-Class

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
TU257_Lab1-Introduction.ipynb236 linesDownload Raw Back to New_Data_Analytics
1{2 "cells": [3  {4   "cell_type": "code",5   "execution_count": 1,6   "metadata": {},7   "outputs": [8    {9     "name": "stdout",10     "output_type": "stream",11     "text": [12      "3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) \n",13      "[Clang 6.0 (clang-600.0.57)]\n",14      "sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)\n"15     ]16    }17   ],18   "source": [19    "import sys\n",20    "import platform\n",21    "\n",22    "#Print Python version details\n",23    "print(sys.version)\n",24    "print(sys.version_info)\n"25   ]26  },27  {28   "cell_type": "code",29   "execution_count": 2,30   "metadata": {},31   "outputs": [32    {33     "name": "stdout",34     "output_type": "stream",35     "text": [36      "x86_64\n",37      "Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64\n",38      "Darwin\n",39      "i386\n"40     ]41    }42   ],43   "source": [44    "#Print details about your computer\n",45    "\n",46    "print(platform.machine())\n",47    "print(platform.version())\n",48    "print(platform.system())\n",49    "print(platform.processor())"50   ]51  },52  {53   "cell_type": "code",54   "execution_count": null,55   "metadata": {},56   "outputs": [],57   "source": [58    "#Write code to print your name"59   ]60  },61  {62   "cell_type": "code",63   "execution_count": null,64   "metadata": {},65   "outputs": [],66   "source": []67  },68  {69   "cell_type": "code",70   "execution_count": null,71   "metadata": {},72   "outputs": [],73   "source": [74    "#Crate a variable containing your name, and print it to the screen"75   ]76  },77  {78   "cell_type": "code",79   "execution_count": null,80   "metadata": {},81   "outputs": [],82   "source": []83  },84  {85   "cell_type": "code",86   "execution_count": null,87   "metadata": {},88   "outputs": [],89   "source": [90    "#Use the input command to allow a user to enter a value\n",91    "#for eample, use the input command to ask the use to enter a string\n",92    "#save the inputted value to a variable\n",93    "#print the variable"94   ]95  },96  {97   "cell_type": "code",98   "execution_count": null,99   "metadata": {},100   "outputs": [],101   "source": []102  },103  {104   "cell_type": "code",105   "execution_count": null,106   "metadata": {},107   "outputs": [],108   "source": [109    "#Use an IF condition to decide what mesage to print\n",110    "#Use the input command to ask the use to enter a number\n",111    "#Use the IF condition to determine if the number if Postive or Negative"112   ]113  },114  {115   "cell_type": "code",116   "execution_count": null,117   "metadata": {},118   "outputs": [],119   "source": []120  },121  {122   "cell_type": "code",123   "execution_count": null,124   "metadata": {},125   "outputs": [],126   "source": [127    "#Add an 'else' condition to the above IF condition\n",128    "#You can decide what the statement should be, what message should be printed?\n"129   ]130  },131  {132   "cell_type": "code",133   "execution_count": null,134   "metadata": {},135   "outputs": [],136   "source": []137  },138  {139   "cell_type": "code",140   "execution_count": 2,141   "metadata": {},142   "outputs": [143    {144     "name": "stdout",145     "output_type": "stream",146     "text": [147      "0\n",148      "1\n",149      "2\n",150      "3\n",151      "4\n"152     ]153    }154   ],155   "source": [156    "#the following will print a range of values\n",157    "for i in range(0,5):\n",158    "    print(i)"159   ]160  },161  {162   "cell_type": "code",163   "execution_count": null,164   "metadata": {},165   "outputs": [],166   "source": [167    "#Take a copy of this code and paste it into the next cell\n",168    "#Change the code to add two variables to contain a number, assign a number to these variables\n",169    "#Change the code in the 'for' loop to print the numbers between the values in the two variables"170   ]171  },172  {173   "cell_type": "code",174   "execution_count": null,175   "metadata": {},176   "outputs": [],177   "source": []178  },179  {180   "cell_type": "code",181   "execution_count": null,182   "metadata": {},183   "outputs": [],184   "source": [185    "#Take a copy of the code in the previous cell\n",186    "#Expand it to ask the user to input two values.\n",187    "#Change the loop to print the values between these two values"188   ]189  },190  {191   "cell_type": "code",192   "execution_count": null,193   "metadata": {},194   "outputs": [],195   "source": []196  },197  {198   "cell_type": "code",199   "execution_count": null,200   "metadata": {},201   "outputs": [],202   "source": [203    "#what else can you do?"204   ]205  },206  {207   "cell_type": "code",208   "execution_count": null,209   "metadata": {},210   "outputs": [],211   "source": []212  }213 ],214 "metadata": {215  "kernelspec": {216   "display_name": "Python 3",217   "language": "python",218   "name": "python3"219  },220  "language_info": {221   "codemirror_mode": {222    "name": "ipython",223    "version": 3224   },225   "file_extension": ".py",226   "mimetype": "text/x-python",227   "name": "python",228   "nbconvert_exporter": "python",229   "pygments_lexer": "ipython3",230   "version": "3.7.3"231  }232 },233 "nbformat": 4,234 "nbformat_minor": 4235}236