Thread: DrRacket Help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Location
    California
    Posts
    1
    Rep Power
    0

    DrRacket Help


    I am trying to teach myself programming using the "How To Design Programs" book which utilizes DrRacket. I am trying to complete an exercise where you define a program that converts Fahrenheit to Celsius, I got everthing to work except the file conversion, where it takes data from a file "in.dat" , converts the numbers and writes them to a new file "out.dat" When I run the command it looks like it is successful but then I go to the file, and there is no "out.dat" doc. Can someone tell me what is wrong?

    Code:
     (define (Fahrenheit->Celsius f)
        (/ (* (- f 32) 5) 9))
    
    
    
    (convert-file "in.dat" Fahrenheit->Celsius "out.dat")
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    1
    Rep Power
    0

    is that everything?


    Originally Posted by soC0pth
    I am trying to teach myself programming using the "How To Design Programs" book which utilizes DrRacket. I am trying to complete an exercise where you define a program that converts Fahrenheit to Celsius, I got everthing to work except the file conversion, where it takes data from a file "in.dat" , converts the numbers and writes them to a new file "out.dat" When I run the command it looks like it is successful but then I go to the file, and there is no "out.dat" doc. Can someone tell me what is wrong?

    Code:
     (define (Fahrenheit->Celsius f)
        (/ (* (- f 32) 5) 9))
    
    
    
    (convert-file "in.dat" Fahrenheit->Celsius "out.dat")

    is this your entire code? if so i beleive that may be the issue. i only gave that section a brief glance but it looked like three functions were required to fully preform this task. i hoep this helps!

IMN logo majestic logo threadwatch logo seochat tools logo