Boston Python Workshop 7/Friday/Tutorial: Difference between revisions
Content added Content deleted
imported>Jesstess (Created page with "Welcome to the Friday tutorial! This tutorial covers several core programming concepts that we'll build upon during an interactive lecture tomorrow morning. It will take 1-2 ...") |
imported>Jesstess |
||
Line 349: | Line 349: | ||
1. |
1. |
||
<pre> |
<pre> |
||
total = 1.5 - 1/2 |
total = 1.5 - 1/2 |
||
print total |
print total |
||
type(total) |
type(total) |
||
Line 365: | Line 365: | ||
<pre> |
<pre> |
||
print 2.0 * 123 + str(2.0) * 123 |
print 2.0 * 123 + str(2.0) * 123 |
||
</pre> |
|||
4. |
|||
(Remember, copying and pasting is fine here in this practice section -- we'll go back to typing out the code for part 2) |
|||
<pre> |
|||
a = "| (_| -()- -()- -()- -()- | -()- -()- -()- -()- ||\n" |
|||
b = "|_\_|_/___|__|__|__|___|__|___|__|___________________________||\n" |
|||
c = "|________________________________|__|__()_|__()_|__()__|_____||\n" |
|||
d = " ___|)_______________________________________________________\n" |
|||
e = "|_/(|,\____/_|___/_|____/_|______|___________________________||\n" |
|||
f = "|___/____________________________|___________________________||\n" |
|||
g = "| | | () | () | () | | ||\n" |
|||
h = "|__\___|.________________________|___\_|___\_|___\_|___|_____||\n" |
|||
i = "|__/|_______/|____/|_____/|______|___________________________||\n" |
|||
j = "|_____/__________________________|____\|____\|____\|_________||\n" |
|||
k = "|____/___________________________|___________________________||\n" |
|||
l = "|__/___\_._______________________|__|__|__|__|__|__|___|_____||\n" |
|||
print d + f + i + e + b + g + a + c + l + h + j + k |
|||
</pre> |
</pre> |
||