コード例 #1
0
import test as t

l = t.circumference(5)

print('The circumference is now', l)

コード例 #2
0
import test

r = 5

print("circumference =", test.circumference(r))

print("area =", test.area(r))

print("It worked!")

import matplotlib
matplotlib.use('agg')

import matplotlib.pyplot as plt

circle1 = plt.Circle((0.5, 0.5), 0.2, color='r')

fig, ax = plt.subplots()  # note we must use plt.subplots, not plt.subplot
# (or if you have an existing figure)
# fig = plt.gcf()
# ax = fig.gca()

ax.add_artist(circle1)

fig.savefig('circle.png')
コード例 #3
0
print(
    'This is a program that is called script.py and just prints a message on the screen'
)

import test

radius = 5

print(
    'I now want to calculate the circumference of a circle with a radius of ',
    str(radius), ',which will be: ', test.circumference(radius))

print(
    'I also want to calculate the surface of a circle with a radius again of ',
    str(radius), ',which will be: ', test.surface(radius))
コード例 #4
0
import test as t

print('Gal is amazing')
print('miska topoloska')
print('BABA')

print('Circumference', t.circumference(10))
print('Area', t.area(10))


コード例 #5
0
import test

print(test.circumference(2))
コード例 #6
0
ファイル: script.py プロジェクト: remckenzie/test
import test

print(test.circumference(radius=1.0))
print(test.surfacearea(radius=1.0))
コード例 #7
0
import test

print('Hello World 2')
print(test.circumference(8))
plotcircle(3)
コード例 #8
0
print('hello github')

from test import circumference, surface_area

print("the circumference of the circle is", circumference(5))

print("The surface area of the circle is", surface_area(5))

print("another test")
コード例 #9
0
import numpy as np
import test as myfunc

r = 1  # radius of my circle
circum = myfunc.circumference(r)
print("Radius of my circle is ", r, "and circumference is ", circum)
print()
SA = myfunc.SurfArea(r)
print("Surface area is ", SA)
print()