1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mariarad [96]
2 years ago
8

Given N lines of input, print the 3rd character from each line as a new line of output. It is guaranteed that each of the n line

s of input will have a 3rd character.
Input Format
A text file containing N lines of ASCII C characters.
Constraints 1 Output Format
For each line of input, print its 3rd character on a new line for a total of N lines of output.
Sample Input
Hello
World
how are you
Sample Output
Explanation of what to submit Submit your code and output in a word document. Also, submit the actual script in a separate.txt file
-----------------------------------------------------------------------------------------------------------------------------------------
Task
You are given a file with four space separated columns containing the scores of students in three subjects. The first column contains a single character (A-2), the student identifier. The next three columns have three numbers each. The numbers are between 0 and 100, both inclusive. These numbers denote the scores of the students in English, Mathematics, and Science, respectively.
Your task is to identify those lines that do not contain all three scores for students.
Input Format
There will be no more than 10 rows of data. Each line will be in the following format: [Identifier][English Score][Math Score][Science Score]
Output Format
For each student, if one or more of the three scores is missing, display:
Not all scores are available for [Identifier]
Sample Input
A 25 27 50
B 35 75
C 75 78
D 99 88 76
Sample Output
Not all scores are available for B
Not all scores are available for C
Explanation
Only scores have been provided for student B and student C.
Computers and Technology
1 answer:
Juliette [100K]2 years ago
4 0

Answer:

lines = input("enter the lines of strings: ")

line_list = lines.splitlines()

with open("third_characters.txt", "w+") as file:

   for line in line_list:

       file.write(line[2])

       file.write("\n")

Explanation:

The python module gets the input of string values from the user and splits it into a list of strings. The third character on each string item is retrieved and saved in a document file named 'third_characters.txt' with each character on a single line.

You might be interested in
If the speakers are not working on a laptop, what could be the problem besides the speakers?
Elena-2011 [213]

Answer:

Sound card

Explanation:

In computer or laptop music or sound files are stored in digital form. Sound card is the the device that is used to convert the digital form of music into analog to produce the signal that is compatible with speaker or microphone.

If the speakers are not working on the laptop, means there is no sound produced on speakers. It means that sound card is not working properly.

8 0
2 years ago
Each JavaScript command line ends with a(n) ____ to separate it from the next command line in the program.
kykrilka [37]
The answer is :
semicolon (;)
8 0
2 years ago
Fill in the blank - A generation of social-oriented, physical games such as the _______ Wii console, emerged in the late 2000s,
disa [49]

Answer:

wild bro just need points

Explanation:

6 0
3 years ago
A ____________ is a set of commands which can be run by calling it by name.
mixas84 [53]
The answer to this question is a protocol.
7 0
3 years ago
Read 2 more answers
Suppose you use Batch Gradient Descent to train a neural network and you plot the training error at every epoch. If you notice t
Phantasy [73]

Answer:

The answer is "using validation error".

Explanation:

The validation error is used to response the test for one of the queries is activated to the participant, which may not properly answer the question. These errors go up continuously after each time, the processing rate is too high and also the method is different.  

  • These errors are also unless to increase when they are actually in the problem.  
  • The training level will be that, if the learning error may not increase when the model overrides the learning set and you should stop practicing.
6 0
2 years ago
Other questions:
  • Identify the correct software or hardware applications in the passage below
    10·1 answer
  • What is the definition of framerate?
    7·1 answer
  • Add is a function that accepts two int parameters and returns their sum.
    8·1 answer
  • A porta power tool is what kind of tool
    9·1 answer
  • Which word in brackets is most opposite to the word in capitals? PROSCRIBE (allow, stifle, promote, verify)​
    14·2 answers
  • If you wanted to look up an article from the Chicago Tribune the best place to start would be
    7·1 answer
  • According to the video, what kinds of projects would Computer Programmers be most likely to work on? Check all that apply.
    13·2 answers
  • Choose the term that matches the action.
    5·2 answers
  • Discuss, in detail, the usefulness of graphics and images in program development. Explain the importance of the interface of a c
    7·1 answer
  • Jerry purchased 25 dozens of eggs. He used 6 eggs to bake 1 cake. How
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!