Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Python By Neil Cook Twitter: njcuk9999 Slides/Notes:

Similar presentations


Presentation on theme: "Introduction to Python By Neil Cook Twitter: njcuk9999 Slides/Notes:"— Presentation transcript:

1 Introduction to Python By Neil Cook Twitter: njcuk9999 Email: neil.james.cook@gmail.com Slides/Notes: star.herts.ac.uk/~ncook/pythonneil.james.cook@gmail.com

2 2.1 Control Flow

3 Control Flow 2.1 Control Flow

4 if statements 1 2.1 Control Flow

5 if statements 2 2.1 Control Flow

6 if statements 3 2.1 Control Flow

7 if statements 4 2.1 Control Flow

8 if statements 5 2.1 Control Flow

9 if statements 6 2.1 Control Flow

10 if statements 7 2.1 Control Flow

11 if statements 8 2.1 Control Flow

12 if statements 9 2.1 Control Flow

13 if statements 10 2.1 Control Flow

14 if statements 11 2.1 Control Flow

15 Exercise 2.1a 2.1 Control Flow

16 Solution 2.1a 2.1 Control Flow

17 for loops 1 2.1 Control Flow

18 for loops 2 2.1 Control Flow

19 for loops 3 2.1 Control Flow

20 for loops 4 2.1 Control Flow

21 for loops 5 2.1 Control Flow

22 Exercise 2.1b 2.1 Control Flow

23 Solution 2.1b 2.1 Control Flow

24 Building Programs 2.1 Control Flow

25 Exercise 2.1c 2.1 Control Flow

26 Solution 2.1c 2.1 Control Flow

27 Exiting or continuing a loop 1 2.1 Control Flow

28 Exiting or continuing a loop 2 2.1 Control Flow

29 while loops 2.1 Control Flow

30 while loops 2.1 Control Flow

31 2.2 Introduction to numpy

32 Introduction to numpy 1 2.2 Introduction to numpy

33 Introduction to numpy 2 2.2 Introduction to numpy

34 Creating numpy arrays 1 2.2 Introduction to numpy

35 Creating numpy arrays 2 2.2 Introduction to numpy

36 Creating numpy arrays 3 2.2 Introduction to numpy

37 Creating numpy arrays 4 2.2 Introduction to numpy

38 Creating numpy arrays 5 2.2 Introduction to numpy

39 Combining arrays 1 2.2 Introduction to numpy

40 Combining arrays 2 2.2 Introduction to numpy

41 Combining arrays 2 2.2 Introduction to numpy

42 Accessing Arrays 2.2 Introduction to numpy

43 Exercise 2.2a 2.2 Introduction to numpy

44 Solution 2.2a 2.2 Introduction to numpy

45 Slicing Arrays 1 2.2 Introduction to numpy

46 Slicing Arrays 2 2.2 Introduction to numpy

47 Slicing Arrays 3 2.2 Introduction to numpy

48 Multi-dimensional Arrays 1 2.2 Introduction to numpy

49 Multi-dimensional Arrays 2 2.2 Introduction to numpy

50 Multi-dimensional Arrays 3 2.2 Introduction to numpy

51 Exercise 2.2b 2.2 Introduction to numpy

52 Exercise 2.2b 2.2 Introduction to numpy

53 2.3 numpy Functions

54 numpy Functions 2.3 numpy Functions

55 Trig Functions 2.3 numpy Functions

56 Exponential and Logarithm 2.3 numpy Functions

57 Exercise 2.3a 2.3 numpy Functions

58 Solution 2.3a 2.3 numpy Functions

59 Mean, Sum, Median 2.3 numpy Functions

60 Matrix Operations 2.3 numpy Functions

61 Multi-Dimensional functionality 1 2.3 numpy Functions

62 Multi-Dimensional functionality 2 2.3 numpy Functions

63 Exercise 2.3b 2.3 numpy Functions

64 Solution 2.3b (1) 2.3 numpy Functions

65 Solution 2.3b (2) 2.3 numpy Functions

66 Random Number Generation 2.3 numpy Functions

67 Masking 1 2.3 numpy Functions

68 Masking 2 2.3 numpy Functions

69 Masking 3 2.3 numpy Functions

70 Masking 5 2.3 numpy Functions

71 Exercise 2.3c 2.3 numpy Functions

72 Exercise 2.3c 2.3 numpy Functions

73 Solution 2.3c 2.3 numpy Functions

74 Text strings 1 2.3 numpy Functions

75 Text strings 2 2.3 numpy Functions

76 List functions also work with numpy arrays 1 2.3 numpy Functions

77 List functions also work with numpy arrays 2 2.3 numpy Functions

78 List functions also work with numpy arrays 3 2.3 numpy Functions

79 2.4 Introduction to matplotlib

80 Introduction to matplotlib 2.4 Introduction to matplotlib

81 Basic Plotting 1 2.4 Introduction to matplotlib

82 Basic Plotting 2 2.4 Introduction to matplotlib

83 Basic Plotting 3 2.4 Introduction to matplotlib

84 Basic Plotting 4 2.4 Introduction to matplotlib

85 Basic Plotting 4 2.4 Introduction to matplotlib

86 Basic Plotting 5 2.4 Introduction to matplotlib If you are interested, you can specify some of these attributes with a special syntax, which you can read up more about in the documentation: http://matplotlib.org/api/pyplot_api.html#m atplotlib.pyplot.plot

87 Customising Plots 2.4 Introduction to matplotlib

88 Saving and displaying plots 2.4 Introduction to matplotlib

89 Exercise 2.4a 2.4 Introduction to matplotlib

90 Solution 2.4a (1) 2.4 Introduction to matplotlib

91 Solution 2.4a (2) 2.4 Introduction to matplotlib

92 Learning more 2.4 Introduction to matplotlib But sometimes you don’t even know how to make a specific type of plot. In which case you can look at the matplotlib gallary for example plots and scripts: http://matplotlib.org/gallery.htmlhttp://matplotlib.org/gallery.html

93 Learning more 2.4 Introduction to matplotlib But sometimes you don’t even know how to make a specific type of plot. In which case you can look at the matplotlib gallary for example plots and scripts: http://matplotlib.org/gallery.htmlhttp://matplotlib.org/gallery.html

94 2.5 matplotlib Plots

95 Plot 2.5 matplotlib Plots

96 Always remember to close your plot! 2.5 matplotlib Plots

97 Finalising your graph 2.5 matplotlib Plots

98 Scatter Plot 2.5 matplotlib Plots

99 Exercise 2.5a 2.5 matplotlib Plots

100 Solution 2.5a 2.5 matplotlib Plots

101 Histogram 1 2.5 matplotlib Plots

102 Histogram 2 2.5 matplotlib Plots

103 Pie charts 2.5 matplotlib Plots

104 3D plots 2.5 matplotlib Plots

105 Multiple plots in one figure 1 2.5 matplotlib Plots

106 Multiple plots in one figure 2 2.5 matplotlib Plots

107 Multiple plots in one figure 3 2.5 matplotlib Plots

108 Adding plots to subfigures 1 2.5 matplotlib Plots

109 Adding plots to subfigures 2 2.5 matplotlib Plots

110 Adding plots to subfigures 3 2.5 matplotlib Plots

111 Changing the Resolution of a graph 1 2.5 matplotlib Plots

112 Before 2.5 matplotlib Plots Changing the Resolution of a graph 2 After

113 Exercise 2.5b 2.5 matplotlib Plots

114 Solution 2.5b (1) 2.5 matplotlib Plots

115 Solution 2.5b (2) 2.5 matplotlib Plots

116 Solution 2.5b (3) 2.5 matplotlib Plots

117 Solution 2.5b (4) 2.5 matplotlib Plots

118 Problems 2 2.6 Problems 2


Download ppt "Introduction to Python By Neil Cook Twitter: njcuk9999 Slides/Notes:"

Similar presentations


Ads by Google