-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHunton_DSC530_Week2.py
48 lines (39 loc) · 1.45 KB
/
Hunton_DSC530_Week2.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
47
48
# -------------------------------------------------
# File: Week2_Hunton.py
# Name: Debbie Hunton
# Due Date: 3/22/20
# Course: DSC 530 – EDA
# Description: Run a number of calculations to
# show facility with Python basic programming.
# -------------------------------------------------
# Display the text “Hello World! I wonder why that is always the default
# coding text to start with”
print('Hello World! I wonder why that is always the default coding text to \
start with.')
# Add two numbers together
Monty_Python_Productions = 54 + 5
print(Monty_Python_Productions)
# Subtract a number from another number
Num_Years_Show = 1974 - 1969
print(Num_Years_Show)
# Multiply two numbers
Total_Num_People = 5 * 6
print(Total_Num_People)
# Divide between two numbers
Num_Episodes_Per_Year = 45 / 4
print(Num_Episodes_Per_Year)
# Concatenate two strings together (any words)
Word1 = 'Vorpal'
Word2 = 'Bunny'
My_Fav_Character = Word1 + Word2
print(My_Fav_Character)
# Create a list of 4 items (can be strings, numbers, both)
Argument_Clinic = ["I told you once.", "No you haven't.", "Yes, I have.",
"When?"]
print(Argument_Clinic)
# Append an item to your list (again, can be a string, number)
Argument_Clinic.append("Just now.")
print(Argument_Clinic)
# Create a tuple with 4 items (can be strings, numbers, both)
Unladen_Swallow = (11, 'meters', 'per', 'second')
print(Unladen_Swallow)