# Simple mass object orbit algorythm Written By Mark A Hopper - Helicopter Pilot.
# This Python file uses the following encoding: utf-8
# Powershell.exe -executionpolicy remotesigned -File  "input_box1.ps1"

import os, sys
import math  
import random
import string

# coding = utf-8

print(" ")

print ("Let's calculate the velocity of an artificial satellite orbiting the Earth in a")
print ("circular orbit at an altitude between 100 and 200 km above the Earth's surface.")

# Radius of Earth = 6,378.14 km 
# GM of Earth = 3.986005×(10 ** 14) m3/s2 	
# Given:  r = (6,378.14 + 200) × 1,000 = 6,578,140 m

number10 = float(input("Enter a number between 100/200[km]: "))

# if number10 > 200: print("Your input is too large,  go back and try again!")

if number10 > 200:
   print("Your input is too large,  go back and try again!")
   exit()
if number10 < 100:
   print("Your input is too small,  go back and try again!")
   exit()
else:
   print("Great Choice!") 

r = (6378.14 + number10) * 1000
# print(r)
g = 3.986005*(10 ** 14)
# print(g)

q = (g / r)

v = round(math.sqrt(q))
v = round(v)

# txt = "For only {price:.2f} dollars!"
# print(txt.format(price = 49)) 

#      v = SQRT[ GM / r ]
#      v = SQRT[ 3.986005×(10 ** 14) / 6,578,140 ]
#      v = 7,784 m/s

# print("There are <", 2**32, "> possibilities!", sep="")
print("   ")
# print ("round(70.23456) : ", round(70.23456))
print(("The velocity at your altitude input is {}" .format(v)) + (" meters per second."))
# v = round(v)
# print(("The velocity at your altitude input is v") + (" meters per second."))
print("   ")

exit()