Introduction to Programming (IS111)
Ace your homework & exams now with Quizwiz!
print(2//2)
1
print(2//2.0)
1.0
print(9//2)
4
print(9/2)
4.5
Iteration
repetition. What is iteration and loop in Python? A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).
Concantenate
to link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)