Skip to main content
added 61 characters in body
Source Link
JaDogg
  • 4.6k
  • 3
  • 29
  • 66

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.

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.

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.
added 339 characters in body
Source Link
JaDogg
  • 4.6k
  • 3
  • 29
  • 66

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.

This is a very interesting task. Good work on doing it. Here are some criticism.


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.

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.
added 85 characters in body
Source Link
JaDogg
  • 4.6k
  • 3
  • 29
  • 66

This is a very interesting task. Good work on doing it. Here are some criticism.


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 askStrask 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.

This is a very interesting task. Good work on doing it. Here are some criticism.


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 askStr twice to a string. This is redundant.
  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.

This is a very interesting task. Good work on doing it. Here are some criticism.


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.
Source Link
JaDogg
  • 4.6k
  • 3
  • 29
  • 66
Loading