This file contains hidden or 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
import pygame | |
import random | |
BLACK = (0,0,0) | |
RED = (255, 0, 0) #These tuples are RGB by the way | |
WHITE = (255, 255, 255) | |
pygame.init() | |
WIDTH = 450 | |
HEIGHT = 600 |
This file contains hidden or 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
import pygame | |
import random | |
BLACK = (0,0,0) | |
RED = (255, 0, 0) | |
WHITE = (255, 255, 255) | |
pygame.init() | |
WIDTH = 450 | |
HEIGHT = 600 |
This file contains hidden or 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
import pygame | |
import random | |
BLACK = (0,0,0) | |
RED = (255, 0, 0) | |
WHITE = (255, 255, 255) | |
pygame.init() | |
screen = pygame.display.set_mode([450, 600]) |
This file contains hidden or 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
import pygame | |
BLACK = (0,0,0) | |
RED = (255, 0, 0) | |
screen = pygame.display.set_mode([450, 600]) | |
another_loop = True | |
clock = pygame.time.Clock() | |
This file contains hidden or 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
RIFOXOL | |
9--2---9---2-NO | |
-4---3---3JOLE- | |
--4---2-2---I-- | |
2--4---2--MUD-2 | |
----4----MA---- | |
-3---3-GROWTHS- | |
--2-G-DIED--2U- | |
9--CAVES---2-QI | |
--2-ZA2-2---T-N |
This file contains hidden or 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
#1) What value does the following expression evalutate to? | |
2 ** 3 ** 2 | |
#2) Rewrite this code to use a for loop instead of a while loop: | |
n = 8 | |
while n >= 1: | |
n -= 3 | |
print(n) | |
#3) What is the type of the following expression: |
This file contains hidden or 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
n = int(input("")) | |
grade_book = {} | |
for i in range(n): | |
raw_line = input("") | |
L = raw_line.split() | |
student_name = L[0] | |
grades = list(map(float, L[1:])) | |
grade_book[student_name] = grades | |
lookup_name = input("") |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main() { | |
//Create a class called DEPQ which implements | |
// (at least) three methods: | |
// void DEPQ::insert(n) | |
// int DEPQ::pop_max(); |
This file contains hidden or 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
def generic_list_rec(L): | |
if L == []: | |
return something | |
else: | |
return f(generic_list_rec(L[1:]), L[0]) | |
def generic_int_rec(n): | |
if n == 0: | |
return something | |
else: |
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta name="google-signin-client_id" content="CUSTOM_ID_HERE.apps.googleusercontent.com"> | |
<title>CAS Test</title> | |
<script src="https://apis.google.com/js/platform.js" async defer></script> | |
</head> | |
<body> | |
<h1>Hi there</h1> | |
<h2>Please sign in with one of our authentication services:</h2> |