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
DaniilM [7]
3 years ago
14

(PYTHON) Write a program that uses this technique to read a CSV file such as the one given above. Display the IDs and names of t

he students with the highest and lowest scores.

Computers and Technology
1 answer:
Ludmilka [50]3 years ago
7 0

Answer:

import csv

with open('employee_birthday.txt') as csv_file:

csv_reader = csv.reader(csv_file, delimiter=',')

line_count = 0

for row in csv_reader:

if line_count == 0:

print(f'Column names are {", ".join(row)}')

line_count += 1

else:

print(f'\t{row[0]} works in the {row[1]} department, and was born in {row[2]}.')

line_count += 1

print(f'Processed {line_count} lines.')

Explanation:

Heres an example of how to read csvs

You might be interested in
When you first open a word processor, you’ll find a ? document. A. filled B. blank C. edited
NikAS [45]
B, blank document is the answer
3 0
3 years ago
Read 2 more answers
Write a function called countstuff () that takes as a parameter a character array, and returns an int. The prototype must be:
PSYCHO15rus [73]

Answer:

Please kindly go to the explanation part.

Explanation:

The required function is written in Raw code below.

Function:

#include<stdio.h>

#include<ctype.h> //including required libraries

int countstuff(char s[]){ //Function countstuff

int cntUp=0,cntLow =0,cntDigits = 0,i=0,value; //declaring required variables

for(i=0;s[i]!='\0';i++){ //loop to iterate over the characters of string

if(isupper(s[i])){

cntUp++; //incrementing count of uppercase if it is uppercase character

}

else if(islower(s[i])){

cntLow++; //incrementing count of lowercase if it is lowercase character

}

else if(isdigit(s[i])){

cntDigits++; //incrementing count of digits if it is digit

}

}

value = cntUp*1000000 + cntLow*1000 + cntDigits; //counting value using formula given in question

return value; //returning the value

}

void main(){

char string[1000]; //declaring required variables

int value;

printf("Enter a String:");

scanf("%[^\n]s",string); //taking string as input

value = countstuff(string); //calling function

printf("The Value is : %d\n",value); //printing result

}

5 0
2 years ago
Drivers dealing with strong emotions may take risks they otherwise would not. <br> true false
grigory [225]

This is true because some people may be going through rough times and when they aren't they probably won't feel the same way as they do when they go through tough times.

7 0
3 years ago
What is the differnce between ''P4 and 4P''
34kurt
The number and letter are switched. This question needs more context to get a accurate answer.
5 0
2 years ago
Read 2 more answers
Which major nims component describes systems and methods
Ivahew [28]

Answer:

Communications and Information Management describes systems and methods that help to ensure that incident personnel and other decision makers have the means and information they need to make and communicate decisions.

6 0
2 years ago
Other questions:
  • A collection of coordinating colors that can be used in an Excel document is called a color
    8·1 answer
  • You're trying to improve an ad's perceived quality so it performs better during an ad auction. What change would have the least-
    15·1 answer
  • Given half a chance other people at work will take advantage of you
    11·1 answer
  • What test is most similar to binary​
    9·1 answer
  • What are the three types of programming design?
    15·1 answer
  • Your task is to create a bash shell script that is able to backup all the C++ program files in your current directory. The algor
    10·1 answer
  • What is are motor vehicle emissions?
    8·1 answer
  • Making the data impossible to recover even by applying physical forensics methods is known as __________ of media.
    13·1 answer
  • What year did the first hovercraft sail on water
    15·1 answer
  • What are your considerations in making a derivative ict content ti effectively communicate or present data or information?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!