BIO 3360 Lecture Notes - Lecture 2: American Broadcasting Company, No Type, Global Variable

61 views5 pages
31 Jan 2018
Department
Course
Professor

Document Summary

Lecture 2 - defining functions and for loops. Takes an input and may or may not return an output. Named sequence of statements that perform a certain computation. Specify the name and the sequence of statements. Type(cid:894)(cid:895) = tells you"re the type, integer, string, list, tuple. Help() = tells you what function it is. X = ; dir() = tells you all possible functions to do on this. Module is a file containing python definitions and statements. For example, base python does not have log. To access a particular definition from a module. But if there are multiple variables pi, it won"t work. Get a description of any variable or definition. Define your own function, then the function can have many arguments that may or may not return a value. ******what def add_two_numbers(input_arg1, input_arg2): sum1 = input_arg1 + input_arg2 return(sum1)