Activity for General Sebast1anâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #284117 | Initial revision | — | about 3 years ago |
Answer | — |
A: A number adder, not a death adder [PHP], 58 28 bytes P1: <?=$argv[1]+10; Try it online! (more) |
— | about 3 years ago |
Edit | Post #282472 |
Post edited: |
— | about 3 years ago |
Edit | Post #284116 | Initial revision | — | about 3 years ago |
Answer | — |
A: Evens or Odds - you know this one [PHP], 36 bytes <?php $x=(int)fgets(STDIN);echo$x%2; Try it online! Outputs `1` if odd and `0` if even. (more) |
— | about 3 years ago |
Edit | Post #284115 | Initial revision | — | about 3 years ago |
Answer | — |
A: Reverse an ASCII string [PHP], 32 24 bytes <?=strrev(fgets(STDIN)); Try it online! (more) |
— | about 3 years ago |
Edit | Post #284114 |
Post edited: |
— | about 3 years ago |
Edit | Post #284114 |
Post edited: |
— | about 3 years ago |
Edit | Post #284114 | Initial revision | — | about 3 years ago |
Answer | — |
A: 1, 2, Fizz, 4, Buzz! [PHP], 114 bytes Philippine Peso this language, it was tricky. (more) |
— | about 3 years ago |
Comment | Post #284104 |
Noice, you beat my answer. Congrats! (more) |
— | about 3 years ago |
Edit | Post #284108 | Initial revision | — | about 3 years ago |
Answer | — |
A: Tips for golfing in Python Replace `range()` if $n for i in 0,1,2,3:print(i) Try it online! (more) |
— | about 3 years ago |
Edit | Post #284100 |
Post edited: |
— | about 3 years ago |
Comment | Post #283971 |
@#53837 Thanks for catching that. Unfortunately, `Scanner` is the only way to set an input. At least I got rid of the string assignment. (more) |
— | about 3 years ago |
Edit | Post #283971 |
Post edited: |
— | about 3 years ago |
Edit | Post #284100 | Initial revision | — | about 3 years ago |
Answer | — |
A: Repeat the characters [Python 3], 53 38 bytes def f(x,y): 	for c in x:print(end=cy) Try it online! I'm sure someone will find a `lambda` solution to this. Golfed 15 bytes thanks to @Moshi's advice. (more) |
— | about 3 years ago |
Edit | Post #284091 |
Post edited: |
— | about 3 years ago |
Edit | Post #284091 | Initial revision | — | about 3 years ago |
Answer | — |
A: "Hello, {name}!" [PHP], 55 27 21 bytes Hello, ! Try it online! Golfed 28 bytes thanks to my Software CD post. Golfed 6 bytes thanks to @Shaggy's advice. (more) |
— | about 3 years ago |
Edit | Post #283948 |
Post edited: |
— | about 3 years ago |
Edit | Post #284088 | Initial revision | — | about 3 years ago |
Question | — |
Define a mathematical expression in English Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifications: - The expression can only take in numbers, letters from the English alphabet, the equa... (more) |
— | about 3 years ago |
Comment | Post #284087 |
I suppose an example is the `Hello, World!` challenge, but users should be creative. (more) |
— | about 3 years ago |
Comment | Post #283946 |
@#8176 Yep, that's <a class="badge is-tag">popularity-contest</a>. In fact, I edited it to answer your question. (more) |
— | about 3 years ago |
Edit | Post #283946 |
Post edited: |
— | about 3 years ago |
Edit | Post #284079 |
Post edited: |
— | about 3 years ago |
Edit | Post #284079 |
Post edited: |
— | about 3 years ago |
Edit | Post #284080 | Initial revision | — | about 3 years ago |
Answer | — |
A: Suggestions for the new header banner/background Binary and code plastered a lot One of the more generic ways of adding design to a code challenge site. The binary digits can be plastered around the header in a way that it looks cryptic. But binary is not enough, we can also have code of certain languages for some diversity. What's more cool ... (more) |
— | about 3 years ago |
Edit | Post #284079 | Initial revision | — | about 3 years ago |
Answer | — |
A: Digit Sum Integer Sequence (working title) [Python 3], 183 181 175 bytes def f(a,b): 	c=a;a=str(a) 	for i in range(b): 		y=0;z=9 		for j in range(len(a)): 			if y<int(a[j]):y=int(a[j]) 			if z>int(a[j]):z=int(a[j]) 		c=int(a)+y+z;a=str(c) 	print(c) Try it online! I deci... (more) |
— | about 3 years ago |
Comment | Post #284068 |
I hope you get a title that you'd like to use. (more) |
— | about 3 years ago |
Suggested Edit | Post #279696 |
Suggested edit: (more) |
helpful | about 3 years ago |
Edit | Post #284066 | Initial revision | — | about 3 years ago |
Answer | — |
A: Tips for golfing in Python Assign `float`s while leaving out zeroes Python allows such strange assignment. You can save bytes by removing the number preceding `.` if it's only `0`: i=.5 print(i) Try it online! The same goes for succeeding digits, if the decimal part of the `float` is `0`: ... (more) |
— | about 3 years ago |
Edit | Post #283858 |
Post edited: |
— | about 3 years ago |
Edit | Post #284023 |
Post edited: |
— | about 3 years ago |
Edit | Post #284040 |
Post edited: |
— | about 3 years ago |
Edit | Post #284064 | Initial revision | — | about 3 years ago |
Answer | — |
A: Reverse an ASCII string [Lua], 32 bytes print(string.reverse(io.read())) Try it online! Noice built-in. (more) |
— | about 3 years ago |
Edit | Post #284063 | Initial revision | — | about 3 years ago |
Answer | — |
A: Getting perfect squares, differently [Lua], 41 40 bytes x=0 y=1while""do print(x)x=x+y y=y+2 end Try it online! (more) |
— | about 3 years ago |
Edit | Post #284062 | Initial revision | — | about 3 years ago |
Answer | — |
A: A number adder, not a death adder [Lua], 51 bytes P1: print("print(tonumber(io.read())+"..io.read()..")") Try it online! P2 (given I inputted 10, 29 bytes): print(tonumber(io.read())+10) Try it online! (more) |
— | about 3 years ago |
Edit | Post #284040 |
Post edited: |
— | about 3 years ago |
Edit | Post #284061 | Initial revision | — | about 3 years ago |
Answer | — |
A: Tips for golfing in Python Renaming functions A funny, cool, and useful trick. If you have to write a single function multiple times (usually `range()` on `for` loops), then you can simply assign a variable by the function's name, no parentheses. An example assignment is: ``` r=range ``` Thing is, this can only appl... (more) |
— | about 3 years ago |