[ create a new paste ] login | about

Scaevolus

Name:
Email:
Site/Blog:
Location:
Default language: Python
Favorite languages:
About:

Saved pastes by Scaevolus:

Python, pasted on Feb 24:
1
2
3
4
5
import math
import random

trials = 0
insides = 0
...
view (17 lines, 1 line of output)
Python, pasted on Oct 7:
1
x=0;exec"x+=1;print'Fizz'*(x%3<1)+'Buzz'*(x%5<1)or x;"*100
view (1 line, 100 lines of output)
Python, pasted on Sep 6:
1
2
3
4
5
import collections
from operator import itemgetter as ind

data = ((1, 'Size', 'Small'),
        (2, 'Size', 'Large'),
...
view (33 lines, 18 lines of output)
C, pasted on Nov 22:
1
2
3
4
#include <stdio.h>
void main() {
int i; char a[]="Hate";
for (i=0;i<3;i++){a[i]=(a[i]>>1+1)*.92+92;} a[1]-=3; printf("%s\n", a);}
view (4 lines, 1 line of output)
Python, pasted on Apr 11:
1
print '\n'.join((((str(i),"Fizz")[i%3<1],"Buzz")[i%5<1],"FizzBuzz")[i%15<1] for i in xrange(1,101))
view (1 line, 101 lines of output)
Python, pasted on Apr 11:
1
print '\n'.join([str(i),"Fizz","Buzz","FizzBuzz"][-min([0,i%3-1,2*(i%5-1),3*(i%15-1)])] for i in xrange(1,101))
view (1 line, 101 lines of output)
Python, pasted on Apr 11:
1
print '\n'.join(["FizzBuzz" if not i % 15 else "Fizz" if not i % 3 else "Buzz" if not i % 5 else str(i) for i in xrange(1,101)])
view (1 line, 101 lines of output)