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
What shortcut bring up the print page
Kobotan [32]
The keyboard shortcut to bring up print on windows is ctrl+P, for Mac it's cmd+P.

Unless, you mean print screen - for that, there is a button that should say prt sc on your keyboard for windows, and for Mac, it's cmd <span>+ ctrl + shift + 3 to save to clipboard (or don't hold down the ctrl to save to your desktop).</span>
7 0
3 years ago
Read 2 more answers
Given the variables full_admission_price and discount_amount (already defined), write an expression corresponding to the price o
stiks02 [169]

Answer:

if full_admission_price = f and discount_amount = d

=> Price of a discount admission = d/f

total_weight

quantity

weight of one item = total_weight/quantity                      

for i in range(80, 18, -2):

   print(i, end=' ')

Explanation:

The first two questions are just mathematical to get a single quantity given some relationship. So, its basically division

For the python code, I used the python's range function which takes in three arguments. The first one is the starting value, the second one is the terminating value which is the number before the terminating value and the last one specifies the common difference popularly known as step in the language. Since the step is 2, only even numbers are printed out. In the print function, I made use of the end keyword specifying a space (' ') as the end. This ensures that the print is done in the same line with a space seperating them. Without that specification, each result will printed in a newline

7 0
3 years ago
What does 32mb SVGA do
Nadya [2.5K]

Answer:

hope it helps PLZ MARK ME BRAINLIEST,,!

Explanation:

They stabilize your grpahic image.

5 0
2 years ago
Is apple better than android
KatRina [158]

In a sense yes as it has a more user friendly interface but in terms of usability android is a far better os

3 0
3 years ago
Read 2 more answers
Once you follow someone on Twitter, your tweets will automatically show up on their newsfeed. True False
Mrrafil [7]

true

-------------------------------------------------------

8 0
2 years ago
Other questions:
  • Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo
    8·1 answer
  • Which of the following is NOT a group on the Slide Master tab?
    6·1 answer
  • I need help. I wanna help a friend by giving him my powerpoint but I dont want him to steal my work. Is their anyway to restrict
    8·1 answer
  • -Define three types of user mode to kernel mode transfers?
    11·1 answer
  • Write a string class. To avoid conflicts with other similarly named classes, we will call our version MyString. This object is d
    5·1 answer
  • Which of these is NOT a mathematical operator used in Python?
    12·1 answer
  • Elsa wants to save her work at the office to be continued at home either on a pen drive or CD. Outline three reasons why she wil
    6·1 answer
  • Explain the different type of shift register counter ​
    14·1 answer
  • 1. If an android phone is out of date or outdated and it requires an update. Explain the steps how I can update this phone.
    15·2 answers
  • Which activity is performed during high-level design in the V-model?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!