Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Homework

Name: Anonymous 2009-04-01 16:01

Take a number from the standard input and output "Sussman" this many times, using Python.

Name: Anonymous 2009-04-03 12:00

>>36-37,40
n=`cat`; yes "Sussman" | head -n $n

Name: Anonymous 2009-04-03 12:13

what

Name: Anonymous 2009-04-03 12:17

>>41
EXPERT READER

Name: Anonymous 2009-04-03 14:33

>>41
n=`cat`; yes "Sussman" | head -n $n | tr -d '\n'

Name: Anonymous 2009-04-03 15:57

chris@chrislaptop ~> n=`cat`; yes "Sussman" | head -n $n | tr -d '\n' 
fish: Unknown command “n=`cat`”. Did you mean “set n `cat`”? For information on
assigning values to variables, see the help section on the set command by typing
“help set”.
head: option requires an argument -- n
usage: head [-n lines | -c bytes] [file ...]

Name: Anonymous 2009-04-03 16:03

>>45
Maybe you should use a real shell instead of pretending the failings of your toy setup are our problem.

Name: Anonymous 2009-04-03 16:50

I paid $5000 for my Mac. For all intents and purposes, your setup can only be a ``toy'' compared to mine.

Name: Anonymous 2009-04-03 17:02

>>47
You mean for all intense and porpoises

Name: Anonymous 2009-04-03 17:20

>>47
The fact that it's an expensive toy doesn't make it not a toy. It just makes you a spoiled brat.

Name: Anonymous 2009-04-03 17:29

read n;yes "Sussman"|head -n$n

Name: Anonymous 2009-04-03 17:36

C:\> read n;yes "Sussman"|head -n$n
Bad command or filename - "read".
Bad command or filename - "head".

C:\>

Name: Anonymous 2009-04-03 17:38

(defun sussman (n)
  (if (> n 0)
    (progn
      (format t "Sussman~%")
      (sussman (1- n)))))

(sussman (coerce (read) 'number))

Name: Anonymous 2010-11-14 17:40

Name: Anonymous 2011-01-31 20:49

<-- check em dubz

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List