Python Forum
question about input, while loop, then print
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about input, while loop, then print
#6
#!/usr/bin/python3
 
'''
name #1 : april
name #2 : brett
name #3 : susan
 
 
>> create list
'''
 name = [ ]
count = 1
while (count <= 3):
    name.append(input ("Name #: "))
    count += 1
 
count = 1
while (count <= 3):
     print(" \n", count, name)
     count += 1
 
##########  end program
Reply


Messages In This Thread
RE: question about input, while loop, then print - by Underscore - Sep-30-2021, 12:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  WHILE LOOP NOT RETURNING USER INPUT AFTER ZerroDivisionError! HELP! ayodele_martins1 7 1,101 Oct-01-2023, 07:36 PM
Last Post: ayodele_martins1
  Code won't break While loop or go back to the input? MrKnd94 2 983 Oct-26-2022, 10:10 AM
Last Post: Larz60+
  Question: print issue python202209 3 977 Sep-18-2022, 11:51 AM
Last Post: jefsummers
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 1,519 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  input function question barryjo 12 2,766 Jan-18-2022, 12:11 AM
Last Post: barryjo
Big Grin General programming question (input string)[ jamie_01 2 1,626 Jan-08-2022, 12:59 AM
Last Post: BashBedlam
  A question about 'Event loop is closed' fc5igm 2 2,258 Oct-05-2021, 02:00 AM
Last Post: fc5igm
  why print('\n') produced 2 new lines instead of 1 - Located inside a FOR loop JulyFire 2 2,554 Jan-10-2021, 01:50 AM
Last Post: JulyFire
  I want to check if the input is str or is int & if it's str repeat the loop HLD202 4 2,835 Nov-23-2020, 11:01 PM
Last Post: perfringo
  Loop back through loop based on user input, keeping previous changes loop made? hbkpancakes 2 2,964 Nov-21-2020, 02:35 AM
Last Post: hbkpancakes

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020