I&C SCI 32 Lecture 11: Lecture11.py

28 views1 pages

Document Summary

#lecture 11 7-28-16 x = 3 #it is an int print(type(x)) y ="green" #it is a string print(type(y)) z = [1,2,3] #it is a list print(type(z)) x =(1,2) #it changes to a tuple print(type(x)) #the value is what determines the class print(len(y)) Realize that python does is go to the value of the variable and checks that the method is available for the class. def foo(x, y): return x. bar(y)*2. As long as the parameters i use have the methods available then it will work. #can enter different types of options like a list of integers.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents