1

I am trying to get a input to be typed after the "Choice: " but i also want to continue "*" around the whole text... Im not sure how to do it even after trying multiple times with variations and research i couldn't dind an answer...

print("  ********School Quizes********  ")
print("  *                           *  ")
print("  *       A) Register         *  ")
print("  *       B) Loging           *  ")
print("  *       C) Quit             *  ")
print("  *                           *  ")
input("  *                Choice: ") & print(" *  ")

so that it is printed with "Choice:(here will be the input) * "

Alzz_HD
  • 11
  • 6

2 Answers2

1

Technically, you could just do this:

print("  ********School Quizes********  ")
print("  *                           *  ")
print("  *       A) Register         *  ")
print("  *       B) Loging           *  ")
print("  *       C) Quit             *  ")
print("  *                           *  ")
input("  *       Choice:             *  ")

All the text in the quotation marks do is that it just acts as text to be prompted, which is why this works.

Brian Ton
  • 377
  • 2
  • 12
  • even if i do this when inputing it will be like so, " * Choice: * (input will go here) " but i want it like this "* Choice:(input here) * " – Alzz_HD Nov 18 '17 at 09:39
0

I can do it this way. But I feel this is really a hack...

x = input('''
  ********School Quizes********  
  *                           *  
  *       A) Register         *  
  *       B) Loging           *  
  *       C) Quit             *  
  *                           *  
                              *\r  *             Choice:    ''')
Chun-Yen Wang
  • 568
  • 2
  • 10
  • this has not worked at all... in fact please test codes before hand next time, im always thankful for the support and help though! – Alzz_HD Nov 14 '17 at 21:31
  • i did test it using the python interpreter of jupyter notebook's terminal. that's a unix environment. – Chun-Yen Wang Nov 14 '17 at 21:49