generated from mwc/lab_names
Done
This commit is contained in:
@@ -4,3 +4,7 @@
|
||||
|
||||
print("This program will calculate the area of a circle.")
|
||||
radius = float(input("What is the circle's radius? "))
|
||||
pi = 3.141592653
|
||||
circle_area = pi * radius * radius
|
||||
print("The circle's area is")
|
||||
print(circle_area)
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
# ------------
|
||||
# By MWC contributors
|
||||
|
||||
my_name ="Chris"
|
||||
my_name = input("What is your name?")
|
||||
greeting = "Hello, " + my_name
|
||||
print(greeting)
|
||||
|
||||
17
shapes.py
17
shapes.py
@@ -5,7 +5,20 @@
|
||||
from turtle import *
|
||||
|
||||
def triangle(side_length):
|
||||
pass
|
||||
forward(side_length)
|
||||
right(120)
|
||||
forward(side_length)
|
||||
right(120)
|
||||
forward(side_length)
|
||||
right(120)
|
||||
|
||||
def rectangle(height, width):
|
||||
pass
|
||||
forward(width)
|
||||
right(90)
|
||||
forward(height)
|
||||
right(90)
|
||||
forward(width)
|
||||
right(90)
|
||||
forward(height)
|
||||
right(90)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user