Declaration of functions in Python is nice and simple. def my_function(): print(“Hello From My Function!”) The call is also uncomplicated my_function() With Arguments def sum_two_numbers(a, b): return a + b sum_two_numbers(10,8)
Archive for March, 2017
Python Basics
March 10th, 2017 BlogAdmin
The absolute basics: Strings print(“Goodbye, World!”) x = “string value” print (x) Integers myint = 7 print(myint) Floats myfloat = 7.0 print(myfloat) myfloat = float(7) print(myfloat)