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]
3 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]3 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
Casting is one of the oldest known manufacturing processes. <br> True or false
alexandr1967 [171]
I think the answer is true because casting has been found 6000 years ago!
7 0
3 years ago
Read 2 more answers
Which statements describe the elements of the email function? Check all that apply.
liq [111]

Which statements describe the elements of the email function? Check all that apply.

Messages are delivered from one email address to another.

An email address can be used to identify the sender in Contacts.

The local part of the email address contains the user name.

The domain part of the email address can a business name.

Answer:

The local part of the email address contains the user name.

The domain part of the email address can a business name.

Explanation:

Elements of email function include the local part of the email which can contain the username, the domain part of the email, the sender, receiver, and other components.

8 0
3 years ago
Read 2 more answers
Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that both adds
Alborosie

Answer:

Following are the statement which is given below:

if (gpa > 3.5)  // check the condition if gpa exceeds 3.5.

{

deansList++;  // increment of 1 in the deansList variable

cout << studentName;  // display the studentName,  

}

Explanation:

The description of the statement

  • In the if statement we check the condition of "gpa" .if  "gpa"  is greater then 3.5 then it executed the statement inside the if block otherwise nothing will be executed.
  • if control moves to the if part it adds to 1 to the deansList.
  • Finally, display the value of studentName.
3 0
3 years ago
Case 9-2 Gracie is trying to decide between Windows or macOS for her new desktop computer. Since you have desktops that run both
MrMuchimi

Answer:

Finder

Explanation:

The Finder is the default file manager and graphical user interface shell used on all Macintosh operating systems. Described in its "About" window as "The Macintosh Desktop Experience", it is responsible for the launching of other applications, and for the overall user management of files, disks, and network volumes.

- this seems very course reliant, refer to your course if this is not the answer you were looking for.

3 0
3 years ago
What is the difference between Windows 7 and Windows 10?
Tanzania [10]
Windows 10 is new and windows 7 is old
6 0
3 years ago
Other questions:
  • A software company is weighing whether to release a new version of its software as scheduled. The company can go ahead and relea
    5·1 answer
  • With respect to the five components of social media information systems (SMIS), which of the following statements is true of SM
    11·1 answer
  • A ? is the desired value where a process should be maintained. The value may be manually set, automatically set, or programmed.
    13·1 answer
  • A workstation’s user prefers KDE over GNOME. Which login manager can this user run to ensure direct login to KDE?
    5·1 answer
  • Regular languages are closed under complement. True False
    7·1 answer
  • A network administrator is attempting to troubleshoot an issue regarding certificates on a secure website. During the troublesho
    8·1 answer
  • Pls answer i need to turn it in today!!
    15·1 answer
  • C++
    11·1 answer
  • An engineer is designing an HTML page and wants to specify a title for the browser tab to display, along with some meta data on
    12·1 answer
  • Fire stick optimizing system storage and applications
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!