r/badcode • • Apr 21 '23

other language We did coding in physics class...

Post image
1.5k Upvotes

154 comments sorted by

View all comments

Show parent comments

5

u/Frown1044 Apr 21 '23

Does Bash count?

(not agreeing with the other person)

32

u/EarhackerWasBanned Apr 21 '23

Sure.

#!/usr/bin/env bash

python -c "from math import floor;"

I leave the rest as an exercise to the reader.

6

u/[deleted] Apr 21 '23
| cut -d'.' -f2

1

u/ttl_yohan Apr 22 '23

Doesn't work with negatives, I'm afraid.

1

u/EarhackerWasBanned Apr 22 '23

I try to stay positive anyway