Skip to content

Instantly share code, notes, and snippets.

View AndyNovo's full-sized avatar

Andy Novocin AndyNovo

View GitHub Profile
CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SOURCES=main.cpp hello.cpp factorial.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=hello
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
#### 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
#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);
#include <iostream>
#include <string>
#include <cassert>
using namespace std;
class Diva {
//Your Code Here
//End Code Here
<!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>
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:
#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();
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("")
#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:
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