Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help
#1
# Your code below...
name = "  "
number_of_names = int(input("How many names do you have: "))

for i in range(number_of_names):
    next = input("Enter Your Name: ")
    name = name + next
    
print ("Your name is:" + name)
The only problem I'm having is I'm not sure how to get the spaces between the names.

I get the following return:
How many names do you have: 3
Enter Your Name: Bob
Enter Your Name: tim
Enter Your Name: Tom
Your name is: BobtimTom
Reply


Messages In This Thread
Help - by alwillia - May-24-2018, 06:32 PM
RE: Help - by j.crater - May-24-2018, 06:51 PM
RE: Help - by buran - May-24-2018, 07:00 PM

Forum Jump:

User Panel Messages

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