This file contains hidden or 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
# ipAddress = input("please enter an ipAddress: ") | |
ipAddress = "192.168.7.7" | |
# check if number of dots is 3 | |
numberOfDot = 0 | |
for char in ipAddress: | |
if char == '.': | |
numberOfDot += 1 | |
totNumbOfDot = numberOfDot # output of this section is totNumberOfDot, to be checked at the end |
This file contains hidden or 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
txtInput = str(input("please enter a palindrome: ")) | |
reversedInput = txtInput[::-1] | |
if reversedInput == txtInput: | |
print("good job") | |
else: | |
print("you missed it") |
NewerOlder