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
firstclass = [0,0,0,0,0,0,0,0] #list that stores first class data | |
economyclass = [0,0,0,0,0,0,0,0] #list that stores economy class data | |
booked = {} #Stores names and seat numbers of booked people | |
def displayseats(): #This will display seats in a formatted way | |
print("First Class Economy Class") | |
for each in range(0,4): | |
if firstclass[each] == 0: | |
print("(" +str(each+1) + ")", end='') |
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
firstclass = [0,0,0,0,0,0,0,0] #list that stores first class data | |
economyclass = [0,0,0,0,0,0,0,0] #list that stores economy class data | |
booked = {} #Stores names and seat numbers of booked people | |
def displayseats(): #This will display seats in a formatted way | |
print("First Class Economy Class") | |
for each in range(0,4): | |
if firstclass[each] == 0: | |
print("(" +str(each+1) + ")", end='') |
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
firstclass = [0]*8 #list that stores first class data | |
economyclass = [0]*8 #list that stores economy class data | |
booked = {} #Stores names and seat numbers of booked people | |
def displayseats(): #This will display seats in a formatted way | |
print("First Class Economy Class") | |
for each in range(0,4): | |
if firstclass[each] == 0: | |
print("(" +str(each+1) + ")", end='') |
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
<pre class="brush: jscript; title: ; notranslate" title=""> | |
var generate = function (len, chars) { | |
var ret = '', | |
charsLen = chars.length; | |
while (len--) { | |
ret += chars[Math.floor(Math.random() * charsLen)]; | |
} | |
return ret; | |
}; |
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 random | |
import string | |
availablewords = ['anaconda','all of me','rude','chandelier','guts over fear','maps'] | |
punc = set(string.punctuation) | |
hangman = "HANGMAN" | |
tried = set() | |
def hangmangame(): | |
again = True | |
while again: | |
alreadySaid = set(['a','e','i','o','u','A','E','I','O','U']) |
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, sys | |
from pygame.locals import * | |
FPS = 4 | |
csize = 10 | |
wwidth = int(input("Enter width of the table: "))*csize | |
wheight = int(input("Enter size of the table: "))*csize | |
cwidth = wwidth / csize |
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> | |
#define SIZE 100 | |
using namespace std; | |
class node | |
{ | |
public: | |
node() |
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
### A program to download wallpapers from alphacoders.com | |
###Author: N.V.Pruthvi Raj, Anantapur, India. | |
###Date: 23/12/2014 | |
import requests | |
import shutil | |
import re | |
import os | |
from bs4 import BeautifulSoup | |
url = 'http://wall.alphacoders.com/by_sub_category.php?id=173173&name=Naruto&page=1' | |
baseurl = url[0:url.find('page=')+5] |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
package apples; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.*; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptException; |
OlderNewer