Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

for loop

  1. kkhhhkk

    Python Write an empty line at the end of my files

    I have the following code that writes out multiple files. I want this code to also write out an empty line at the end of each file produced, I've tried adding ('\n\') inside the loop however it adds an empty line to every line which is annoying i = 0 f = open('innput.txt','r') always_print =...
  2. grepawk

    problem loading numbers into array

    Hello i am trying to make code which will request user for his phone number (on one line), that number will be stored in array number, everything works ok till i dont type less then 10 numbers and press enter, cycle is waiting for next number/s on new line but i want program to give message...
  3. B

    Java For loop to print out numbers in order

    Hi, I'm trying to write a code with for-loop to get numbers in order. For example 3,4,5,6 or -1,0,1,2,3. This is what I have come up with this far. public static void runLoop(int start, int end){ for (start <= end; start++){ System.out.print(start); } }
  4. N

    Answered How would i make a for loop generate text side by side instead of in newlines?

    For example, normally for loops do text like this: for num in 1 2 3 4 5; do echo "$num" done 1 2 3 4 5 But what would you need to generate this outcome: 1 2 3 4 5
Back
Top Bottom