Skip to content

Instantly share code, notes, and snippets.

View khayyamsaleem's full-sized avatar
🏠
Working from home

khayyam khayyamsaleem

🏠
Working from home
View GitHub Profile
%% start of file `template.tex'.
%% Copyright 2006-2015 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
%% start of file `template.tex'.
%% Copyright 2006-2015 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
"""Python is especially useful for doing math and can be used to automate many calculations. In this project, you'll create a calculator than can compute the area of a given shape, as selected by the user. The calculator will be able to determine the area of the following shapes:"""
from math import pi
from time import sleep
from datetime import datetime
now = datetime.now()
print "Calculator is starting"
#this program prompts the user to select a shape
#depending on the shape the user selects, the
#program will return the calculated area of that
#shape
#import pi Python code
from math import pi
#code to simulate a thinking calculator
from time import sleep
#import time
var userInput = 'Rock'
userInput = userInput.toLowerCase();
function getComputerChoice() {
var randomNumber = Math.floor(Math.random() * 3)
switch (randomNumber){
case 0:
return 'rock'
case 1:
return 'paper'
case 2:
//Get user sleep hours per day
function getSleepHours (day) {
switch (day) {
case'monday':
return 8;
case'tuesday':
return 8;
case'wednesday':
return 8;
case'thursday':
import java.util.Scanner;
class Node {
int data;
Node next;
Node(int d){
data = d;
next = null;
}
let story = 'Last weekend, I took literally the most beautiful bike ride of my life. The route is called "The 9W to Nyack" and it actually stretches all the way from Riverside Park in Manhattan to South Nyack, New Jersey. It\'s really an adventure from beginning to end! It is a 48 mile loop and it basically took me an entire day. I stopped at Riverbank State Park to take some extremely artsy photos. It was a short stop, though, because I had a really long way left to go. After a quick photo op at the very popular Little Red Lighthouse, I began my trek across the George Washington Bridge into New Jersey. The GW is actually very long - 4,760 feet! I was already very tired by the time I got to the other side. An hour later, I reached Greenbrook Nature Sanctuary, an extremely beautiful park along the coast of the Hudson. Something that was very surprising to me was that near the end of the route you actually cross back into New York! At this point, you are very close to the end.';
let storyWords = story.split
const getSleepHours = day => {
switch (day) {
case "Monday":
return 8
break;
case "Tuesday":
return 6
break;
case "Wednesday":
return 5
%Khayyam Saleem, Ryan Edelstein
%We pledge our honors that we have abided by the Stevens Honor System.
%Finished before Prof. reviewed in lecture, feeling very good.
-module(calc).
-compile([calc/2]).
calc([], {var, _S})->
erlang:error('Variable not in env');
calc([[K,V]|_T], {var, S}) when S == K ->
{const, V};