This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5] | |
def print_grades(grades): | |
for grade in grades: | |
print grade | |
def grades_sum(grades): | |
total = 0 | |
for grade in grades: | |
total += grade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Selector Quiz</title> | |
<style> | |
p{ | |
background-color: gold; | |
} | |
.a { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pyg = 'ay' | |
original = raw_input('Enter a word:') | |
if len(original) > 0 and original.isalpha(): | |
print original | |
word = original.lower() | |
first = word[0] | |
new_word = word + first + pyg | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure that the_flying_circus() returns True | |
def the_flying_circus(): | |
if True and True: | |
Return True | |
elif 9 != 9: | |
Return False | |
else: | |
Return "Nothing!" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
now = datetime.now() | |
print now | |
print now.month | |
print now.day | |
print now.year | |
print str(now.month) + str("%") + str(now.day) + str("%") + str(now.year) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .... | |
monty = True | |
python = 1.234 | |
monty_python = python ** 2 | |