-
Notifications
You must be signed in to change notification settings - Fork 0
/
Py2_ACT_Task4C_nscarfe.py
46 lines (46 loc) · 1.39 KB
/
Py2_ACT_Task4C_nscarfe.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Activity 2 Task 4 Part C
# File: Py2_ACT_Task_nscarfe.py
# Date: 13 September 2018
# By: Nicholas Giovanni Scarfe
# nscarfe
# Stella Erickson
# ericks30
# Emily Tonkovich
# etonkovi
# Gautam Fotedar
# gfotedar
# Section: 1
# Team: 20
#
# ELECTRONIC SIGNATURE
# Nicholas Giovanni Scarfe
# Stella Erickson
# Emily Tonkovich
# Gautam Fotedar
#
# The electronic signatures above indicate that the program
# submitted for evaluation is the combined effort of all
# team members and that each member of the team was an
# equal participant in its creation. In addition, each
# member of the team has a general understanding of
# all aspects of the program development and execution.
#
# A BRIEF DESCRIPTION OF WHAT THE PROGRAM OR FUNCTION DOES
# takes the unit vector of the hour hand on a clock and converts
# that to an hour
#---------------------------------------------------
# Inputs
#---------------------------------------------------
import math as m
x = input()
y = input()
#---------------------------------------------------
# Computations
#---------------------------------------------------
def calcHour(xVec,yVec):
return (m.atan2(-int(yVec),int(xVec)) * (180 / m.pi) + 105) / 30
#---------------------------------------------------
# Outputs
#---------------------------------------------------
print(calcHour(x,y))
print(m.floor(calcHour(x,y)), " Gong sounds")