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
CC=g++ | |
CFLAGS=-c -Wall | |
LDFLAGS= | |
SOURCES=main.cpp hello.cpp factorial.cpp | |
OBJECTS=$(SOURCES:.cpp=.o) | |
EXECUTABLE=hello | |
all: $(SOURCES) $(EXECUTABLE) | |
$(EXECUTABLE): $(OBJECTS) |
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
#### PROJECT SETTINGS #### | |
# The name of the executable to be created | |
BIN_NAME := hello | |
# Compiler used | |
CXX ?= g++ | |
# Extension of source files used in the project | |
SRC_EXT = cpp | |
# Path to the source directory, relative to the makefile | |
SRC_PATH = . | |
# Space-separated pkg-config libraries used by this project |
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> | |
#include <forward_list> | |
using namespace std; | |
int main() { | |
forward_list<int> sll; | |
sll.push_front(231); | |
sll.push_front(321); | |
sll.push_front(666); | |
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> | |
#include <string> | |
#include <cassert> | |
using namespace std; | |
class Diva { | |
//Your Code Here | |
//End Code Here |
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> |
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
#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
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
#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
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 |