[Question]
  [
## Challenge:
Create a function or program that will take an input N (a number from 0 - 24) which represents the HOUR.
Output should draw an analog clock out of asterisks showing the hour N.
# üïõüïêüïëüïíüïìüïîüïïüïñüïóüïòüïôüïöüïõüïêüïëüïíüïìüïîüïïüïñüïóüïòüïôüïöüïõ
---
## Notes:
‚Ä¢The minute hand must be longer than the hour hand (in terms of number of asterisks used)
‚Ä¢The minute hand must be at least 2 asterisks.
‚Ä¢Noon, 3pm, 6pm, and 9pm will always be orthogonal. Your output for intermediary hours, when arranged by degrees, should be in the same order as the hours of the day. What I mean is at noon the hour hand is 0¬∫ and at 3pm the hour hand is 90¬∫ so for your output cases of 1pm and 2pm the following must be true: `0pm_deg < 1pm_deg < 2pm_deg < 3pm_deg`. Apart from this rule the actual degree amount can be whatever you decide, obviously it will change depending on font and other native factors.
‚Ä¢The connecting joint between the hour hand and minute hand is a circular/oval unicode character of any kind. `o, O, ‚Ä¢, 0, etc.`
---
## Example Input / Output (May vary depending on drawing styles)
```
 N = 3;
 *
 *
 *
 O¬† *¬† *
```
---
```
 N = 4;
 *
 *
 *
 O
¬†¬†¬† *
¬†¬†¬†¬†¬†¬†¬†*
```
---
```
 N = 5;
 *
 *
 *
 0
¬†¬†*
¬†¬†¬†*
```
---
```
 N = 6;
 *
 *
 o
 *
```
---
```
 N = 7;
      *
      *
      *
      ‚Ä¢
    *
  *
```
---
```
 N = 0,12,24;
 *
 *
 *
 o
```
---
Example of Differentiating Outputs:
```
 N = 4     VS   ¬† N = 5     VS   ¬† N = 6
  *    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†*    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†*
  *    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†*    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†*
  O    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†O    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†O
      *    ¬†   ¬†¬†¬†¬†  *    ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†*
```
---
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the program with the shortest bytecount wins!
  
[Answer]
# Javascript (ES6), 105 76 65 bytes
```
F=N=>`  *
ab*12
 9@3
87654`.replace(/\w/g,y=>'0x'+y^N%12?' ':'*')
```
```
<!-- Snippet Demo: -->
N =  <input type="number" min="0" max="24" value="2" id="I" />
<button onclick="console.log(F(I.value))">Run</button>
```
* **-29 bytes:**
	+ Reduced size of minute and hour hand to 2 and 1 asterisks respectively. Smaller clock = less bytes :-P
* **-11 bytes:**
	+ Changed string comparison to numeric comparison.
	+ `y==(N%12).toString(16)?'*':' '` -> `'0x'+y^N%12?' ':'*'`
## Original with longer hands: (105 94 bytes)
```
F=N=>`    *
a b * 1 2
  ab*12
  99@33
  87654
8 7 6 5 4`.replace(/\w/g,y=>'0x'+y^N%12?' ':'*')
```
```
<!-- Snippet Demo: -->
N =  <input type="number" min="0" max="24" value="2" id="I" />
<button onclick="console.log(F(I.value))">Run</button>
```
[Answer]
## CSS/HTML(JavaScript), 62 + 106 = ~~180~~ 168 bytes
```
pre{position:absolute;left:99px;bottom:99px;transform-origin:50% 80%}
```
```
<input oninput=h.style.transform=`rotate(${this.value*30}deg)`><pre>*
*
o</pre><pre id=h>*
</pre>
```
Edit: Saved 9 bytes thanks to @nderscore.
[Answer]
# [Python 2](https://docs.python.org/2/), ~~148~~ ~~140~~ 135 bytes
-8 by deleting some leftover spaces and an unneeded newline.
-5 by changing `(' ','*')` to `' *'`
```
a=input()
b='''    *
a b * 1 2
  ab*12
9 9 o 3 3
  87654
8 7 6 5 4'''
for x in range(1,12):b=b.replace(hex(x)[2],' *'[x==a%12])
print b
```
[Try it online!](https://tio.run/nexus/python2#DctLCsMgFEbh@V3FPyk@CIVr3gVXEjLQYttAMSIpuHvrGX5wqrNHTL9LKvJWCIGWJgcPDYYhwHnNhlasONGjb7LM0zjQghkTRgztoteZUXBEZBffQXLHRj289fcc0tc9g/yEIovazN4JaLEVa92Nza4o5SNe8LUy/wE "Python 2 ‚Äì TIO Nexus")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 144 bytes
```
#define v ,t
h;t(i){putchar(i>12?i-9:h^i?32:42);}n(i){h=i%12;puts("  *")v(10)v(11)v(h)v(1)v(2)v(19)v(12)v(9)v(57)v(3)v(19)v(8)v(7)v(6)v(5)v(4);}
```
[Try it online!](https://tio.run/nexus/c-gcc#NU7LDoIwELzzFRsMoUVMoOCLqvwIMUGBtAcrqasX4rfjrgmHmZ3s7GPmVdcP1vXwgRQDo1FYOY1vvJvWC3vJVW03x8pcbV2oqlRSfx1PmLONcqVp8CVCgCSUH5FnTDmRYUFQXI9MrFhs90TF0j4QuLFjh1DS@dk6hEdr6Q2JNgVOAkkCNwlTAADD0/8tPGcaT6rUS9q4cbGUoydzEGHUVY0LU5SpE7heS827vse3d5Dp4Dv/AA "C (gcc) ‚Äì TIO Nexus")
[Answer]
# SmileBASIC, ~~90~~ ~~88~~ 74 bytes
```
INPUT H?("  *"+" "*47)*2;"  o
R=H/1.9LOCATE 2.5+SIN(R)*2,3.5-COS(R)*2?"*
```
Example output:
```
? 5
  *
  *
  o
  
   *
? 3
  *
  *
  o *
```
[Answer]
# [Python 3](https://docs.python.org/3/), ~~86~~ 85 bytes
-1 byte, better clockface (credit DuctrTape, as used in my Jelly answer)
```
def f(h):print(*([c,' *'[h%12+64==ord(c)]][c>'@']for c in'''
K*A
J*B
I0C
HFD
G E'''))
```
**[Try it online!](https://tio.run/nexus/python3#@5@SmqaQppGhaVVQlJlXoqGlEZ2so66gpR6doWpopG1mYmubX5SikawZGxudbKfuoB6bll@kkKyQmaeurs7lreXI5aXlxOVp4Mzl4ebC5a7gChTW1PwPUpQBVKRQlJiXnqphZKppxcUJsSFDk4szDUxC@Jr/AQ)**
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~35 34~~ 33 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
·ªã‚Äú tI¬©‚Äô≈í?·∏ä¬§¬µ‚Å∂·∫ã13‚Äù*‚Å∏¬¶·πñ;‚Äú**o‚Äù·πô7s5ZY
```
**[Try it online!](https://tio.run/nexus/jelly#AUQAu///4buL4oCcIHRJwqnigJnFkj/huIrCpMK14oG24bqLMTPigJ0q4oG4wqbhuZY74oCcKipv4oCd4bmZN3M1Wln///8yMQ)** (`tI¬©`!) or see all **[(0 - 24)](https://tio.run/nexus/jelly#@/9wd/ejhjkKJZ6HVj5qmHl0kv3DHV2Hlhza@qhx28Nd3YbGjxrmaj1q3HFo2cOd06yBKrW08oFCD3fONC82jYr8b2T6cMe2Q1uP7jnc/qhpTSQI/wcA)**.
### How?
```
·ªã‚Äú tI¬©‚Äô≈í?·∏ä¬§¬µ‚Å∂·∫ã13‚Äù*‚Å∏¬¶·πñ;‚Äú**o‚Äù·πô7s5ZY - Main link: h
          ¬§                       - nilad followed by link(s) as a nilad:
 ‚Äú tI¬©‚Äô                           -     base 250 number: 522956007
       ≈í?                         - shortest permutation of [1,N] that would be at
                                     that index in a lexicographically sorted
                                     list: [2,3,4,5,6,7,1,12,11,10,9,8,13]
         ·∏ä                        - dequeue: [3,4,5,6,7,1,12,11,10,9,8,13]
·ªã                                 - index into (1-based and modular, so h=2 picks 4,
                                     as does h=14 [as do h=26, h=-10, etc.])
           ¬µ                      - monadic chain separation (call the result j)
            ‚Å∂                     - space character
             ·∫ã13                  - repeat 13 times
                   ¬¶              - apply to index...
                  ‚Å∏               - ...left argument (j)
                ‚Äù*                -     an asterisk character (replacemes the space
                                         at index j with an asterisk)
                    ·πñ             - pop the last character off the list ‚Ä†
                     ;‚Äú**o‚Äù       - concatenate "**o"
                           ·πô7     - rotate left by 7 ‚Ä°
                             s5   - split into chunks of length 5 (columns)
                               Z  - transpose (get the rows of the clock)
                                Y - join with line feeds
                                  - implicit print
```
Note that `‚Äú tI¬©‚Äô≈í?·∏ä` (permutation at index, dequeued) is a byte save over `‚Äú9»ß·ª§_√ë·∏∂‚Äôb‚Å¥` (base 16 of), which is a byte save over `‚Äú¬¶√æx·πô<»•‚Äô·∏É13` (bijective base 13 of).
`‚Ä†` Regarding the pop - we have an extra space in the string, which is where the asterisk for 0, 12, 24 will go to to allow mod-12 indexing of the list of indexes, popping the last character off there is byte-cheaper than doing the concatenation of `‚Äú**o‚Äù` beforehand and overwriting one of those asterisks.
`‚Ä°` Regarding the rotation - this is a byte save over constructing a string with the `‚Äú\*\*o‚Äù in the middle (either with it before or after the asterisk placement).
[Answer]
## Haskell, 148 bytes
```
c n=mapM_ putStrLn$(t(n-3)!(t n!(\_->'*')))(map(\x->(2!(\_->x))"     ")"**O  ")
n!f=(\(x,a:y)->x++f a:y).splitAt n
t n=2+truncate(2.5*sin(n*pi/6))
```
Function c is the one that solves the given task
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + Unix utilities, 57 bytes
```
tr `dc -e12o$1O%p` \*<<<'B*1
A*2
9O3
864
7 5'|tr 1-9AB \ 
```
(There's a space after the final backslash.)
[Try it online!](https://tio.run/nexus/bash#@19SpJCQkqygm2polK9i6K9akKAQo2VjY6PupGXI5ahlxGXpb8xlYWbCZa5gql4DVG2oa@nopBCj8P//f2MA "Bash ‚Äì TIO Nexus")
Not a very pretty clock, but it meets all the requirements.
[Answer]
# PHP, 71 bytes
1 asterisk hours hand, 2 asterisk minutes hand.
```
$s="  *
  *  
  O  
";$s[ord(BGHNTSRQPJDE[$argv[1]%12])&31]="*";echo$s;
```
takes input from command line argument; run with `-nr`.
1. define template
2. map hour to position (decode from letter) and set character at position to asterisk
3. print
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 41 bytes
This is too slow for TIO.
```
14√ù≈ì‚Ä¢2!&√¥√∑‚Ä∞‚Ä¢√®v‚Ä¶ *@y_2L11+¬π12%0‚Äö√¨y√•+√®J}3√¥¬ª
```
For similar code working on TIO try [this](https://tio.run/nexus/05ab1e#AUgAt///4oCiR8OOw6bCruKAmsW@asKx4oCiMTVCUzE1w7Z24oCmICpAeV8yTDExK8K5MTIlMOKAmsOsecOlK8OoSn0zw7TCu///MTk)
Pretty sure this can still be both golfed and sped up.  
Explanation coming later.
[Answer]
## [Logicode](http://esolangs.org/wiki/Logicode) 634 bytes
Couldn't figure out how to input so there is a var a=... for the input at the top of tio link
```
circ v(a)->cond((a&1000)+0)&a->0/a
circ n(a)->cond a&10000->((a&100)+0)|!(a&100)&((a&011)|100)/a
circ y(a)->cond((a&100)+0)&a->a&10011/a
var s=@100000
var m=@101010
var x=y(n(v(a)))
var e=x&1000
var f=(x&100)+0
var t=(x&10)+00
var o=(x&1)+000
circ r(a,b)->cond(a)->b/@a
out s+s+s+s+m
out r(e&t&!o,m)+s+r(o&e&t,m)+s+m+s+r(o&!e&!f&!t,m)+s+r(t&!o&!f&!e,m)
out s+s+r(e&t&!o,m)+r(e&t&o,m)+m+r(o&!t&!f&!e,m)+r(t&!o&!f&!e,m)
out r(e&o&!t,m)+s+r(e&o&!t,m)+s+@110000+s+r(t&o&!f&!e,m)+s+r(t&o&!f&!e,m)
out s+s+r(e&!t&!o,m)+r((f&t&o),m)+r(f&t&!o,m)+r(f&!t&o,m)+r(f&!t&!o,m)
out r(e&!t&!o,m)+s+r(f&t&o,m)+s+r(f&t&!o,m)+s+r(f&o&!t,m)+s+r(f&!t&!o,m)
```
Have given up on golfing this. Could make it shorter at the cost of making the clock look horrible though.
[Try it Online](https://tio.run/nexus/logicode#bZFNboMwEIX3OYWtStZYSRtTZUvFDXoGQ0FCLXZkHApS7k49Y34cpfJmvsebmWczaMd0nmVKKXZ4ac315llrWNka7aY39ml@JvZr3XfPblfmLXu/zFXrKjaAlq8flTVfAKAF9sujkgJVddYHMpndFC0q4GJH950vtSAxk3eEtXt6WrFtIMqy4BxC/j4vaLgi6pDwEI35BAYwrZQk1PlIUQiaHMZlMLGPHDCyJUZUMZMDfSq3O4WiPBf6YMOj9cd4OiIHtfCC21Mng@bAisARukXgteCN4H61oJ2UOijbyHRQrKns4gi/Nfw7ABtssiKlgv65WlbvjU/CQxS@Z4EGw8gITRISLyXSmj5sgXj6Ls16of5hSKQ0@j5onv8A)
]