Converting integers into Unary Notation I have written a python script that has tallies representing digits 1-9 (0 is just ":" ) Unlike true Unary languages that are in the form 1^k. I represent values for n as per their decimal digits. The integer 121 is 1_11_1 Overall every k digit out of n "integer" is in Tally notation, and the amount of tallies is the sum of all the digits in a given n "integer" such as 121 = 4, 1_11_1 = 4.

Its called a many-one reduction. If you can transform Instance A(9,33,4) into Instance B(1111_1111 1, 111----111, 1111) in poly-time, then its NP-complete

Transformation rules is to just to enter each integer sequentially when asked in the while loop. Also, when your integer is a negative you do not give a "-" symbol for input. It will ask for input if its a negative integer.

Input 

(9,33,4) "9, and then 33 and then 4. One at a time for each input."

Output

'111_1111 1' = 9

    111     
33&gt;&gt;
    111     

    11 11    =4


Algorithm for the Reduction

# This algorithm is very simple and inconsequential.
# It converts integers into a unary like language 
# in poly time. All tallies are represented vertically.

print('If your integer is a negative, the script will ask.')
print("DO NOT GIVE -X integers for input!!!")
print('Script will output multiple - symbols for a negative integer transformation')

while 0 == 0:
  ask = input('Enter an integer from a subset-sum instance sequentially.')
  askStr = str(ask)
  res = list(map(int, str(askStr)))
  x = (res)
  asktwo = input('Is your integer a negative integer? y or n: ')
  if asktwo == str("y"):
     twinkle = str('-')
  else:
     twinkle = str(" ")  
  for n in x:
      if n == 0: 
       tallyone = ":"
       print(twinkle, tallyone)
      if n == 1:
       print(twinkle, "1")
      if n == 2:
       print(twinkle, "11")
      if n == 3:
       print(twinkle, "111")
      if n == 4:
       print(twinkle, "11 11")
      if n == 5:
       print(twinkle, "111 11")
      if n == 6:
       print(twinkle, "111 111")
      if n == 7:
       print(twinkle, "111_111 1")
      if n == 8:
       print(twinkle, "1111 1111")
      if n == 9:
       print(twinkle, "1111_1111 1")


 Question

In what way, is this code sloppy? Am I using while loops and variable names in an ugly way? Is my tallies in the print statements hard to read? What is the ugliest parts of my code and how would I improve them?

The code works. But, I don't know enough about python so what mistakes are you seeing in my code?
This is a very interesting task. Good work on doing it. Here are some criticism. 




print('If your integer is a negative, the script will ask.')
print("DO NOT GIVE -X integers for input!!!")
print('Script will output multiple - symbols for a negative integer transformation')




Do not use both double quote
("") and single quote ('') strings. Pick one. I personally prefer "".



while 0 == 0:
  ask = input('Enter an integer from a subset-sum instance sequentially.')




It's considered a best practice to indent using 4 spaces instead of 2.
Also it would be better to move actual transform functionality to a new function.
Also it's better to use while True instead of while 0 == 0 to indicate a endless loop.


Reason: This is more readable. 




  askStr = str(ask)
  res = list(map(int, str(askStr))




You are converting ask twice to a string. This is redundant. 
Since input() returns a string you don't need to convert this at all.
It is also a better to use python conventions for names. Ex: ask_str or value



  x = (res)




You don't need parenthesis here. 
There is also no need to assign to x you can directly use res.



  if asktwo == str("y"):
     twinkle = str('-')
  else:
     twinkle = str(" ")




You don't need to convert a string literal to a string again.
You can directly use "y" as a string.
twinkle is not a good name. Use something like sign.