My noob py workout

Hey guys!
I would like to share my even-odd number seeker code.
I am a newbee in python but you know :slight_smile:
here is the code.

#Welcome to even-odd number analyzer

print("Welcome to  even-odd number analyzer.")

print("")

print("Enter your values. Type 'stop' to quit from program")
i=0
j=0
k=0

numbers=[]
results=[]

while True:

    x=input("Your input is : ")

    print("")
    

    try:

        value = float(x)
        print("your  input  is taken as, ",value)
        print("")

        numbers.append(value)
        
        i = i + 1
        
        print(i," iterations has been made")
        print("")
        
    except ValueError:
        if x=="stop":
            break
        
        print("this is not a number, please enter a number")

while j<i:

    reminder = numbers[j]%2

    if  reminder == 0:

        results.append("even")

    else:

        results.append("odd")

    j=j+1

while k<j:

    print(k+1,"",numbers[k],"",results[k])

    k=k+1

print("")

print("end of the program")
print("")
print("I hope you enjoyed!")
print("")
print("Made by Burak Ayan, Thanks to Paul Mcworther,Angela Sondeman and Freecodecamp.org")

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Nice!! We were once at this level :grinning_face_with_smiling_eyes:
Check out the blackslash ( ‘’ )and its uses in Python

  1. \n can be used to print a blank line (new line)
  2. \t can be used to insert tabs e.t.c
    It will definitely be useful

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.