Python Forum
Unable to implement loop count
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to implement loop count
#4
Use string formatting:

input("Name of Solution {}: 'quit' to stop: ".format(loops))
Format puts the item passed to it in place of the braces ({}). If you pass it multiple arguments, it can replace multiple braces. And far more complicated stuff.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Unable to implement loop count - by zukochew - Jul-25-2018, 05:17 PM
RE: Unable to implement loop count - by Larz60+ - Jul-25-2018, 05:35 PM
RE: Unable to implement loop count - by zukochew - Jul-25-2018, 05:44 PM
RE: Unable to implement loop count - by ichabod801 - Jul-25-2018, 06:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  While loop that needs to count up ImLearningPython 4 3,115 Dec-17-2018, 02:30 PM
Last Post: ImLearningPython
  Count Letters in a Sentence (without using the Count Function) bhill 3 5,222 Jun-19-2018, 02:52 AM
Last Post: bhill

Forum Jump:

User Panel Messages

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