The code segments are illustrations of file manipulations
- The character that completes the code to create a new file is W
- The character that completes the code to add to a new file is A.
<h3>Creating a new file</h3>
When a new file is created, the default file mode is the write mode.
This in other words means that, we are writing to a file.
So, the character that completes the code to create a new file is W
<h3>Adding to a new file</h3>
To add texts to a file, is to append texts to the file.
This means that, the file is an existing file that needs to be updated.
So, the character that completes the code to add to a new file is A.
Read more about file manipulations at:
brainly.com/question/25324400
Yes there's syntax error .
After if there's colon so the next line or code block should start after some spaces(min 4)
The correct code is
Answer:
what are the words and explanation?
Answer:
def numCheck(num):
#this function takes a string representing a number as argument
#returns true if all digits are strictly increasing, false otherwise
for i in range(1,len(num)):
if num[i]<=num[i-1]:
return False
return True
num=input('Enter a six digit number: ')
while len(num)!=6 or not numCheck(num):
print('Incorrect value!! Plese enter again')
num=input('Enter a six digit number: ')