Skip to main content
Notice removed Reward existing answer by MD XF
Bounty Ended with Maya's answer chosen by MD XF
Notice added Reward existing answer by MD XF
Bounty Started worth 250 reputation by MD XF
Tweeted twitter.com/StackCodeGolf/status/898836424572665856
edited tags
Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89
added 8 characters in body
Source Link
quartzic
  • 417
  • 4
  • 7

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string.

It must be able to handle any combination of characters A-Z, a-z, and 0-9.

Example in Python:

import sys
print "print "('" + sys.argv[1]  + "')"

Given the input of testing123, it will return print testing123('testing123').

Since this is , the shortest answer in bytes will win.

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string.

It must be able to handle any combination of characters A-Z, a-z, and 0-9.

Example in Python:

import sys
print "print " + sys.argv[1] 

Given the input of testing123, it will return print testing123.

Since this is , the shortest answer in bytes will win.

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string.

It must be able to handle any combination of characters A-Z, a-z, and 0-9.

Example in Python:

import sys
print "print('" + sys.argv[1]  + "')"

Given the input of testing123, it will return print('testing123').

Since this is , the shortest answer in bytes will win.

added 71 characters in body
Source Link
quartzic
  • 417
  • 4
  • 7

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string.

It must be able to handle any combination of characters A-Z, a-z, and 0-9.

Example in Python:

import sys
print "print " + sys.argv[1] 

Given the input of testing123, it will return print testing123.

Since this is , the shortest answer in bytes will win.

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string.

It must be able to handle any combination of characters A-Z, a-z, and 0-9.

Example in Python:

import sys
print "print " + sys.argv[1] 

Given the input of testing123, it will return print testing123.

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string.

It must be able to handle any combination of characters A-Z, a-z, and 0-9.

Example in Python:

import sys
print "print " + sys.argv[1] 

Given the input of testing123, it will return print testing123.

Since this is , the shortest answer in bytes will win.

Source Link
quartzic
  • 417
  • 4
  • 7
Loading