First bit of the A-level miscellany
[cas-master-teacher-training.git] / Untitled1.ipynb
1 {
2 "metadata": {
3 "name": "",
4 "signature": "sha256:383dbd07426142dba085750cea664fb5a2eb5d274834904c9266a800ddf86c5c"
5 },
6 "nbformat": 3,
7 "nbformat_minor": 0,
8 "worksheets": [
9 {
10 "cells": [
11 {
12 "cell_type": "code",
13 "collapsed": false,
14 "input": [
15 "def anagram1(word1, word2):\n",
16 " return sorted(word1) == sorted(word2)"
17 ],
18 "language": "python",
19 "metadata": {},
20 "outputs": [],
21 "prompt_number": 2
22 },
23 {
24 "cell_type": "code",
25 "collapsed": false,
26 "input": [
27 "anagram1('happy', 'sad')"
28 ],
29 "language": "python",
30 "metadata": {},
31 "outputs": [
32 {
33 "metadata": {},
34 "output_type": "pyout",
35 "prompt_number": 3,
36 "text": [
37 "False"
38 ]
39 }
40 ],
41 "prompt_number": 3
42 },
43 {
44 "cell_type": "code",
45 "collapsed": false,
46 "input": [
47 "anagram1('happy', 'hpayp')"
48 ],
49 "language": "python",
50 "metadata": {},
51 "outputs": [
52 {
53 "metadata": {},
54 "output_type": "pyout",
55 "prompt_number": 4,
56 "text": [
57 "True"
58 ]
59 }
60 ],
61 "prompt_number": 4
62 },
63 {
64 "cell_type": "code",
65 "collapsed": false,
66 "input": [],
67 "language": "python",
68 "metadata": {},
69 "outputs": []
70 }
71 ],
72 "metadata": {}
73 }
74 ]
75 }