In this post, you will get all weeks quiz answers of Java Programming: Solving Problems with Software Coursera (Week 3).
Enroll Here: Java Programming: Solving Problems with Software – Coursera
Course overview (All weeks quizzes answers link)
- Week 1: Java Programming: Solving Problems with Software Coursera Quiz answers
- Week 2: Java Programming: Solving Problems with Software Coursera Quiz answers
- Week 3: Java Programming: Solving Problems with Software Coursera Quiz answers
- Week 4: Java Programming: Solving Problems with Software Coursera Quiz answers
Now, let’s start with Week 3 quiz answers which is a part of Java Programming: Solving Problems with Software
Week 3: Java Programming: Solving Problems with Software Coursera Quiz answers
Below you’ll find all practice quiz answers of different topics/sections in Java Programming: Solving Problems with Software Coursera Quiz answers and end quiz exam answers under week 3.
Practice Quiz: Which Countries Export…? Quiz Answers Coursera – 6 questions
Q1. Which one of the following is a correct version of the code for comparing the name of a country that is in a CSV file that the CSVParser variable parser is processing to see if it is the same name as the String variable country?
a). for (CSVRecord record : parser) {
if(record.get("Country") == country){
// do something
}
}
b). for (CSVRecord record : parser) {
if (parser.get("Country").equals(country)) {
// do something
}
}
c). for (CSVRecord record : parser) {
if (record.get("Country").equals(country)) {
// do something
}
}
Answer: c)
Q2. Suppose there is a CSV file with a column named Exports. A CSVRecord is used to get a String named export, representing the data in this column.
Which one of the following is the correct code for the if condition to determine if both the Strings exportItem1 and exportItem2 are in this CSVRecord in the export column?
a) if (export.contains(exportItem1 || exportItem2)) { }
b) if (export.contains(exportItem1) && export.contains(exportItem2)) { }
c) if (export.contains(exportItem1) || export.contains(exportItem2)) { }
d) if (export.contains(exportItem1 && exportItem2)) { }
Answer: b)
Q5. Run your program on the file exportdata.csv. Call the method countryInfo with the country Nauru. Which one of the following items is listed as an export from this country?
a) Nuts
b) Oil
c) Bananas
d) Wood
e) Phosphates
Answer: e)
Practice Quiz: Weather Data Quiz Answers Coursera – 9 questions
Q1. If cr is a CSVRecord from one of the weather data files, which one of the following is a correct way to add a temperature from the file to an accumulating double variable named total?
a) double temp = Double.parseDouble(cr.get(“TemperatureF”));
total += temp;
b) total += cr.get(“TemperatureF”);
c) total += cr.get(Double.parseDouble(“TemperatureF”));
d) double temp = cr.get(“TemperatureF”);
total += Double.parseDouble(temp);
Answer: a)
Q2. Suppose the name of the file that has the coldest temperature is obtained with this line of code:
filenameWithColdestTemp = something.getName();
Which one of the following must be true about something?
a) something must be of type CSVParser
b) something must be of type DirectoryResource
c) something must be of type CSVRecord
d) something must be of type File
Answer: d)
Q4. Run your program on weather data from April 1, 2014 in the file weather-2014-04-01.csv.
At what time of day did the lowest humidity occur (from the DateUTC column)?
a) 11:51:00
b) 13:51:00
c) 16:51:00
d) 18:51:00
e) 20:51:00
Answer: d)
Q7. Run your program on weather data from 2014.
At what time of day did the lowest humidity in that year occur?
a) 11:51:00
b) 13:51:00
c) 16:51:00
d) 18:51:00
e) 20:51:00
Answer: d)
WEEK 3 QUIZ
CSV Files and Basic Statistics in Java Week 3 Quiz Answers Coursera – 11 questions
This is the end quiz of week 3 in Java Programming: Solving Problems with Software Coursera Quiz answers. It is necessary to complete with 80% or higher.
Questions 1–3 refer to the data file exportdata.csv, available in the .zip download here.
Run your program from the first lesson programming exercise Parsing Export Data on the file exportdata.csv.
Q1. What is the name of the country that is listed as the second country that exports both cotton and flowers?
Answer: Zambia
Q2. Run your program from the first lesson programming exercise Parsing Export Data on the file exportdata.csv.
How many countries export cocoa?
Note: You should only enter a one- or two-digit number representing the number of countries, with no other information included.
Answer: 17
Q3. Run your program from the first lesson programming exercise Parsing Export Data on the file exportdata.csv.
What is the name of the third country (on the third line of the output) listed whose exports are valued at one trillion US dollars or more?
(Hint: Their value in the CSV file should be greater than $999,999,999,999.)
Answer: Germany
Q4. Questions 4–11 refer to weather data in the folder nc_weather, available as a .zip download here.
Run your program developed in Parsing Weather Data to determine the lowest humidity in the file for June 29th, 2014 (weather-2014-06-29.csv).
What was the lowest humidity reading on that day?
Note: You should only enter your two-digit number result, with no other additional information included.
Answer: 40
Q5. Run your program from programming exercise Parsing Weather Data to determine the lowest humidity in the file for July 22nd, 2014 (weather-2014-07-22.csv).
At what time of day did that humidity occur?
(Refer to the time from the DateUTC column.)
a) 11:51:00
b) 13:51:00
c) 16:51:00
d) 18:51:00
e) 20:51:00
Answer: e) 20:51:00
Q6. Run your program from programming exercise Parsing Weather Data to determine the lowest humidity reading in the entire year of 2013.
What was the lowest humidity reading?
Note: You should only enter your two-digit number result, with no other additional information included.
Answer: 16
Q7. Run your program from programming exercise Parsing Weather Data to determine the lowest humidity reading in 2013.
At what time of day did that lowest humidity occur?
(Refer to the time from the DateUTC column.)
a) 16:51:00
b) 18:51:00
c) 20:51:00
d) 21:51:00
e) 23:51:00
Answer: d) 21:51:00
Q8. Run your program from programming exercise Parsing Weather Data to determine the average temperature in Fahrenheit on August 10, 2013 (weather-2013-08-10.csv).
Give your answer with four decimal digits and truncate the rest.
Answer: 80.1964
Q9. Run your program from programming exercise Parsing Weather Data to determine the average temperature in Fahrenheit for those temperature readings when the humidity is greater than or equal to 80 on September 2, 2013 (weather-2013-09-02.csv).
Give your answer with three decimal digits and truncate the rest.
Answer: 72.593
Q10. Run your program from programming exercise Parsing Weather Data to determine which day of the year had the coldest temperature in 2013.
a) December 25, 2013
b) December 30, 2013
c) January 8, 2013
d) January 23, 2013
e) February 1, 2013
Answer: d) January 23, 2013
Q11. Run your program from programming exercise Parsing Weather Data on 2013 data.
What was the coldest temperature recorded in 2013?
Give your answer with one decimal digit. (For example: 10.0)
Answer: 19.0
>> Next: WEEK 4: Java Programming: Solving Problems with Software Coursera Quiz answers
Explore! Artificial Intelligence Foundations Exams answers – SkillUp
NPTEL answers: NPTEL Operating System Fundamentals Assignment solutions
The above question set contains all the correct answers. But in any case, you find any typographical, grammatical or any other error then kindly inform us.
Thanks in advance.
For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.