-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finished Project #1
Open
KAR16
wants to merge
1
commit into
cognits:master
Choose a base branch
from
KAR16:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* In all HTMl file */ | ||
* { | ||
font-family: Helvetica; | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
-ms-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
|
||
/* Headerpage in the HTMl file */ | ||
#pageheader { | ||
font-weight: bold; | ||
color: white; | ||
background: #1A1A80; | ||
border-radius: 0.3125em; | ||
padding-left: .2em; | ||
} | ||
|
||
.sectiontitle { | ||
text-decoration: underline; | ||
} | ||
|
||
/* All lessons in the HTMl file */ | ||
.lesson { | ||
background: #1A1A80; | ||
padding: 0.3125em; | ||
border-radius: 0.3125em; | ||
color: white; | ||
margin-bottom: .2em; | ||
} | ||
|
||
/* All notes in the HTMl file */ | ||
.note { | ||
background-color: #D6F5FF; | ||
border-radius: 0.3125em; | ||
padding: .2em; | ||
margin: .2em; | ||
color: black; | ||
} | ||
|
||
/* All examples in the HTMl file */ | ||
.example { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""This set of functions takes an input, notes, formatted in a list with lists containing the title and notes""" | ||
|
||
#List | ||
notes = ["Lists", "Lists are one of the most powerful storage containers in Python. They are a mutable structure that can hold things like variables, numbers, strings and even other lists. Individual aspects of a list can be changed while not becoming a new, copied list."], ["Index", "Indexing in lists grabs the position of an element in a list. You can using slicing with these indexes to grab certain items in a list."], ["Mutation vs Copied", "While lists can be mutated they can also be copied and will be with certain functions. When concatenating two lists a new list is created to hold the elements. Changing specific values at certain indexes or using a function such as .append mutates the list into holding new or more elements."], ["Finding Length", "To find the length of an element such as a string or list the 'len' function is used. It will return the number of items in a list or characters in a string."], ["In", "The function 'in' is used in a boolean fashion. If x can be found in y, True will be returned. Otherwise it will return False. This can be used to find a certain word in a long string or a certain element in a list."], ["Devensive Programming", "Defensive programming is the practice of desigining code so that it can deal with circumstances that were unintended and allows for the program to continue running instead of crashing."], ["Problem Solving", "Problem solving is a vital process to coding. When trying to figure out how to code or deal with a problem, you need to break it down into several steps. Figure out the input and the output. Write some pseudocode to get an idea of how to structure the code. Then you pick the foundation of the code and begin. After every part extensive testing should be done to ensure the code functions as intended."] | ||
|
||
#Function than show the concepts | ||
def html_note_structure(concept): | ||
"""Puts together a title and note into an html structure""" | ||
html1 = """<div class="note"> | ||
<h3>""" + concept[0] | ||
html2 = """</h3> | ||
<p> | ||
""" + concept[1] | ||
html3 = """ | ||
</p> | ||
</div> | ||
|
||
""" | ||
|
||
return html1 + html2 + html3 | ||
|
||
def much_html(concepts): | ||
"""Repeats html_note_structure until all of notes has been structured""" | ||
HTML = "" | ||
#Loop for the Concepts | ||
for concept in concepts: | ||
HTML += html_note_structure(concept) | ||
return HTML | ||
|
||
#print the HTML structure in the console | ||
print much_html(notes) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In CSS, there is no reason to use an id selector over a class selector. CSS class selectors are better in every way, even if you only use it once.