Compare commits
4 Commits
ddb9fff128
...
98d6333271
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98d6333271 | ||
|
|
b661b1090a | ||
|
|
1fa2be98c6 | ||
|
|
c4850d2833 |
17
Chapter_06/6-03_glossary.py
Normal file
17
Chapter_06/6-03_glossary.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
words = {
|
||||||
|
'loop': 'A repetetive process of actions.',
|
||||||
|
'operator': 'A symbol of an action to take place.',
|
||||||
|
'if statement': 'A conditional process.',
|
||||||
|
'variable': 'An object that can change its value.',
|
||||||
|
'constant': 'An object whose value does not change.',
|
||||||
|
}
|
||||||
|
print(f"Loop:\n{words['loop']}\n--------------------------------------------")
|
||||||
|
|
||||||
|
print(f"\nOperator:\n{words['operator']}\n--------------------------------------------")
|
||||||
|
|
||||||
|
print(f"\nif Statement:\n{words['if statement']}\n--------------------------------------------")
|
||||||
|
|
||||||
|
print(f"\nVariable:\n{words['variable']}\n--------------------------------------------")
|
||||||
|
|
||||||
|
print(f"\nConstant:\n{words['constant']}\n--------------------------------------------")
|
||||||
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
# Exercise 6-1 Person
|
|
||||||
# Learning Objective: Create and print a dictionary.
|
|
||||||
|
|
||||||
person = {'first_name': 'fred', 'last_name': 'guy', 'age': '66', 'city': 'yonkers'}
|
|
||||||
|
|
||||||
print(person['first_name'])
|
|
||||||
print(person['last_name'])
|
|
||||||
print(person['age'])
|
|
||||||
print(person['city'])
|
|
||||||
@ -1,2 +1,2 @@
|
|||||||
## Left off:
|
## Left off:
|
||||||
### Chapter 6 - 6-3 Glossary PG98
|
### Chapter 6 - Looping Through a Dictionary PG99
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user