The code below allows us to read a file into an array then process the data. In this case the processing is just to see how many of each of the numbers (1-6) there were in the file.
for x in range(len(array)):
for number in array:
dice=[0 for x in range(1000)]
for x in range(1,7):
The text file is the result of 1000 D6 rolls.
Can you modify the program to work out which number has the largest number of occurrences?
The LENGTHfunction displays the number of characters in a String or the length of an Array.
name="Stratton was here"
for index in range(len(numbers)):
for index in range(len(name)):
There are three places that CSS data can be stored for use with HTML files.
Inline CSS applies to one html element it is added as the value for a style attribute.
<h1 style='color:red;'>Page heading</h1>
Internal CSS is declared inside <style> which is located in the <head> area of the page. It applies to one page of html.
External CSS is stored inside a separate text file (.CSS) it applies to all webpages that link to it (applies to whole site). A link is required in the <head> of the HTML file this link includes the name of the CSS file