Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:Let it try at 80s/90s games (Score 1) 148

import random
import urllib.request

player = random.choice(['You', 'I'])
station = str()

tube_stations = urllib.request.urlopen(r'https://raw.githubusercontent.com/rk295/tube-postcodes/master/tube-postcodes.txt').readlines()
tube_stations = [i.decode('utf-8').split(',')[0] for i in tube_stations]

while True:
        if 'You' == player:
                station = input('Enter a station: ')
        else:
                station = random.choice(tube_stations)

        if 'Mornington Crescent' == station:
                print("%s won!" % player)
                break
        elif station in tube_stations:
                print("%s chose %s. Wrong!" % (player, station))
                player = 'I' if ('You' == player) else 'You'
        else:
                print('Try a real station!')

Ask and ye shall receive?

Comment Re:OMNI (Score 1) 122

How about a vacuum tube that was formed in a loop passing through Earth and then back around the outside? It would need to be around 8000 miles in diameter (as a circle), since Wolfram Alpha says Earth's radius is 3957 miles. The tunnel would have a circumference somewhat over 25,000 miles.

The engineering is left as an exercise to the reader.

Slashdot Top Deals

IF I HAD A MINE SHAFT, I don't think I would just abandon it. There's got to be a better way. -- Jack Handley, The New Mexican, 1988.

Working...