Q1) Write a Python function partial_print,
which takes one parameter, a string, and prints the first,...
Q1) Write a Python function partial_print,
which takes one parameter, a string, and prints the first, third,
fifth (and so on) characters of the strings, with each character
both preceded and followed by the ^ symbol, and
with a newline appearing after the last ^ symbol.
The function returns no value; its goal is to print its output, but
not to return it.
Q2)
Write a Python function called lines_of_code
that takes a Path object as a parameter, which is...
asap python:
Write a function called fileCaseSwap that takes 2 filenames
(strings) as input parameters. The...
asap python:
Write a function called fileCaseSwap that takes 2 filenames
(strings) as input parameters. The function should:
Open the first file for reading
Open the second file for writitng
Read the first file
Swap the case (swapcase) of every character in
the file
Write the replaced text to the second file.
test call:
fileCaseSwap("emma-short.txt", "emma-short-swap.txt")
fileCaseSwap("emma.txt", "emma-swap.txt")
"""
"""
The first 3 lines of the emma-short-swap.txt file should be
emma
bY jANE aUSTEN
Write an assembly program that reads characters from standard
input until the “end of file” is...
Write an assembly program that reads characters from standard
input until the “end of file” is reached. The input provided to the
program contains A, C, T, and G characters. The file also may have
new line characters (ASCII code 10 decimal), which should be
skipped/ignored. The program then must print the count for each
character. You can assume (in this whole assignment) that the input
doe not contain any other kinds of characters. the X86
assembly program that simply counts...
Writing a program in Python that reads a text file and organizes
the words in the...
Writing a program in Python that reads a text file and organizes
the words in the file into a list without repeating words and in
all lowercase.
Here is what I have
#This program takes a user input file name and returns each word
in a list
#and how many different words are in the program.
while True: #While loop to loop program
words = 0
#list1 =
['Programmers','add','an','operating','system','and','set','of','applications','to','the','hardware',
#
'we','end','up','with','a','Personal','Digital','Assistant','that','is','quite','helpful','capable',
#'helping','us','do','many','different','things']
try:
...
Program Behavior
Each time your program is run, it will prompt the user to enter
the...
Program Behavior
Each time your program is run, it will prompt the user to enter
the name of an input file to analyze. It will then read and analyze
the contents of the input file, then print the results.
Here is a sample run of the program. User input is shown in
red.
Let's analyze some text!
Enter file name: sample.txt
Number of lines: 21
Number of words: 184
Number of long words: 49
Number of sentences: 14
Number of...
C++
Part B: (String)
Program Description:
Write a word search program that searches an input data...
C++
Part B: (String)
Program Description:
Write a word search program that searches an input data file for
a word specified by the user. The program should display the number
of times the word appears in the input data file. In addition, the
program should count and display the number of grammatical
characters in the input data file. Your program must do this by
providing the following functions :
void processFile(ifstream &inFile, string
wordSearch, int &wordCount, int &grammaticalCount) ;
(15%)...