<span>To capitalize lowercase “a”
which is 0110001 which is “A” you will need to flip the following bites 01000001<span> as represented in ASCII. Since we are only looking at
2bit digit which is 0 and 1 which has a
256 possible combinations from 0 up to 255. </span></span>
Answer:
def odd_even(N):
for number in range(0, N+1):
if number % 2 == 0:
print(str(number) + " is even")
elif number % 2 == 1:
print(str(number) +" is odd")
odd_even(5)
Explanation:
- Create a method called odd_even that takes one parameter, N
- Initialize a for loop that iterates through 0 to N
Inside the loop, check if module of the number with respect to 2 is equal to 0. If yes, print it as even number. If module of the number with respect to 2 is equal to 1, print it as odd number
Call the method
Right click the text you want to format, On the home tab click the line and paragraph spacing command . A drop down menu will appear. Move the mouse over the various options . The line spacing will change in the document.
Was that helpful?
Answer:
userInput = input("Please enter a string of words ")
userInput.split ()
for item in userInput.split ():
if item =="darn":
print("Censored")
break
else:
print(userInput)
Explanation:
Using Python programming language, the input function is used to receive the users input and save in a variable userInput
Then the .split method is used to convert the words into a list of words.
Using a for loop, the code checks for the word darn and prints censored if it exists else it prints the userInput