Answer:
Explanation:
The following python code loops through each line within a file called text.txt and counts all the words, then it divides this count by the number of sentences in the text file. Finally, output the average number of words per sentence.
f = open("text.txt", "r")
all_words = 0
sentences = 0
for x in f:
list = x.split(' ')
all_words += len(list)
sentences += 1
average = all_words / sentences
print("There are an average of " + str(average.__round__()) + " words in each sentence.")
Answer: The differences between ultra-book, tablet and slate PC are mentioned as follows:-
- Ultra-book is the notebook structure thin and slim device whereas tablets are type of computer shaped laptops in small size and slate PC has detachable display screen and is a replacement of tablet .
- Ultra-books have large and handy keyboards, tablets have touchscreen and no keyboard presence whereas slate PC has the touchscreen operated through stylus or fingers.
- Ultra-book have good storage space while tablets and slate PC's have less storage space in comparison.