Answer:
lst=["H", "wor", "o w"]
s='Hello world'
contains = True
for i in range (0, len(lst)):
if not lst[i] in s:
contains = False
break
Explanation:
Above code works fine if you make sure that identation is correct.
Answer:
C = M0(M1+M2+M3)+M1(M2+M3)+M2M3 is the equation which suits
Explanation:
From the given data we can state that we need to activate only one product i.e 1------>activated 0-------->means inactivated and also only one slot is activated at a time.The resultant will be no data inputs n control bits and 2 to the power n output bits.
Answer:
I use the dictionary as my reference and the reference format I'd prefer is the internet because its quick and easy to access.
I used this in my journal for the prompt
Answer:
"use the span element to create logical areas on a web page that are embedded within paragraphs or other block formatting elements."
Explanation:
- The question is associated with HTML and web pages. As span is a type of function in HTML.
- <span> element is actually a generic in-line tool/container which is used for content phrasing. Its functionality is much like a <div> element but <div> is a block-level element and on the other hand <span> element is in-line element.
- <span> element groups elements for styling purposes, but it does not represents anything inherently.
Answer:
The solution code is written in Python
- def max(a, b):
- if(a > b):
- return a
- else:
- return b
-
- num1 = int(input("Please input the first number: "))
- num2 = int(input("Please input the second number: "))
-
- print(max(num1, num2))
Explanation:
Firstly create a function max that accepts two input, a and b, as required by question (Line 1). In the function, create if statement to check if a greater than b return a and vice versa (Line 2 -5).
In the main program (Line 7 - 10), prompt user to input two numbers (Line 7 - 8). At last call the function by passing num1 and num2 as arguments and print the result (Line 10).