• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

1.1 - blank lines

 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are blank lines permitted in the output of assignment 1.1?
Originally, I had a line of code to prevent them from occurring, but my first round of feedback from the nitpicker included the comment "That's a lot of math for being inside a loop. Any room for optimization?", referring to that line of code. Rather than moving the code outside any loops (which I probably should have done), I decided to just ditch it. But now I am wondering if it is required to take care of the blank line situation, or not?
~Ryan
 
Sheriff
Posts: 9104
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A blank line before the first line of names or after the last line of names is not a problem. You are not allowed to have blank lines between the rows of names:
<pre>
(blank line here ok)
Gertrude Gertrude Gertrude
(no blank line here)
Gertrude Gertrude Gertrude
(no blank line here)
Gertrude Gertrude Gertrude
(blank line here ok)
</pre>

[This message has been edited by Marilyn deQueiroz (edited January 29, 2001).]
 
ryan burgdorfer
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, got it.
I guess I'll just wait for my next reply from you to implement the change, unless you want me to just do it and re-submit to you?
Also, perhaps that should be added to the problem specification for 1.1...
Thanks,
~Ryan
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hallo,
You can easily prevent it, using the modulus operation,
but that is the next assignment.
 
ryan burgdorfer
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, originally I had a line of code using modulus to do just that...but due to a comment from my first nitpicking, I removed it. In my next submission, I will re-implement it outside of any loops, which I beleive was what the nitpicker was implying.
~Ryan
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic