A sample HTML code that contains headers, paragraph tags, hyperlinks is
- <h1> This is a header </h1>
- <h2> This is a subtitle heading </h2>
- <p> This is a paragraph </p>
- <a href=”www.brainly.com”> Brainly Website </a>
<h3>What is HTML?</h3>
This is the building block of a website and is an acronym that means Hypertext Markup Language.
The HTML code that can be used to add a sample image is: "<img src="pic_Brainly.jpeg" alt="Brainly" width="500" height="333">
The src code means the specific location of the external resource
The width and height show how tall and wide the image would be.
The alt shows the alternative information for the image that can be seen when a person hovers over the image on the website.
Read more about HTML and CSS here:
brainly.com/question/24051672
#SPJ1
We can define a word as a group of characters without a space between them. To find the words of the input string , w can use split(delimiter) which returns a list of strings which had the defined delimiter between them in the input string.
def countWords(string):
words = string.split(" ")
count = len(words)
return count
Here we set the delimiter as the space character, and returned the length of the words list. I split each step into its own line for readability, however the function could be one line:
return len(string.split())
Here, no delimiter is specified. If one isn't given, it will default to split at any whitespace, including space.
favorite_color = input("Enter favorite color:\n")
pet = input("Enter pet's name:\n")
num = input("Enter a number:\n")
print("You entered: "+favorite_color+" "+pet+" "+num)
password1 = favorite_color+"_"+pet
password2 = num+favorite_color+num
print("First password: "+password1)
print("Second password: "+password2)
print("Number of characters in "+password1+": "+str(len(password1)))
print("Number of characters in "+password2+": "+str(len(password2)))
This works for me.