Professional Documents
Culture Documents
Tigran, PHD Student
Tigran, PHD Student
Tigran, PHD Student
Lecture 7
Numpy uses
rad2deg( ) and deg2rad( )
Instead of
acos ->arccos
Argument
Return value
User defined functions
A slightly more complicated function
Suppose
Wrong way round: define function first
A quick detour...
What are the %s doing in our strings?
Instead of:
%s – String
The way you entered your value/string
– the way it will be printed
%i – Integer
No matter the number – it will be shown as an integer
%f – Float
No matter the number – it will be shown as a float (floating point)
User defined functions
Functions can take multiple arguments