coursera answers : Google cloud platform fundamentals for AWS professionals.

Image
                                                                 COURSERA                                                                                                          Google cloud platform fundamentals for AWS professionals                                                             WEEK - 1                                                                           WEEK - 2                                     WEEK - 3                                                      WEEK - 4                                       WEEK - 5                                        WEEK - 6                                       WEEK - 7                                                                                              WEEK - 8                                       WEEK - 9  

Java Programming: Solving Problems with Software solutions(Coursera; all weeks answers)

                                                                       

                                                              Coursera                          

               Java Programming: Solving Problems with Software                                                                              

                                   Week 1

Q. What is the perimeter of the shape made from the file datatest1.txt whose contents are shown below (just give to two decimal places)?

-3,3

-4,-3

4,-2

6,5

 

Ans:- 30.64

 

Q. What is the average length of a side in the shape made from the file datatest4.txt whose contents are shown below (just give to two decimal places)?

-3, 9

-8, 7

-12, 4

-6, -2

-4, -6

2, -8

6, -5

10, -3

8, 5

4, 8

 

Ans:- 5.94

 

 

 Q. What is the longest side in the shape made from the file datatest4.txt whose contents are shown below (just give to two decimal places)?

-3,3

 

-4,-3

 

4,-2

 

6,5

 

Ans:-  8.48

 

Q. Consider the following code for the function mysteryShape that has one parameter a Shape s and calls the function getNumPoints from the assignment.

 

public double mysteryShape (Shape s) {

  double tmp = 0;

  for (Point p : s.getPoints()) {

   

    if (p.getX() > 0) {

     

      if (p.getY() < 0) {

        tmp = tmp + 1;

      }

    }

  }

  return tmp / getNumPoints(s);   

}

Ans:- The function computes the percentage of those points from the Shape s that have a positive X and a negative Y.

Q. what is the average length of a side in the shape made from the file database1.txt whose contents are shown below (just give to two decimal places)?

-3,3

-4,-3

4,-2

6,5

Ans:- 7.66

Q. The method getNumPoints returns the number of points in a Shape s.

Which one of the following is NOT a correct implementation of get Num Points?

 

Ans:- 1 public int getNumPoints (Shape s) {

          2     int count = 0;

          3     for (Point p : s.getpoints())  {

          4        count = count + count;

          5     }

          6     return count;

          7 }

 

 Q. What is the perimeter of the shape made from the file database4.txt whose contents are shown below (just give to two decimal places)?

-3,9

 

-8,7

 

-12,4

 

-6,-2

 

-4,-6

 

2,-8

 

6,-5

 

10,-3

 

8,5

 

4,8

 

Ans:- 59.45

 

Q. What is the name of the file that has the shape with the largest perimeter from the four files example1.txt, example2.txt, example3.txt and example4.txt?

 

Ans:- example3.txt

 

Q. What is the name of the file that has the shape with the largest perimeter from the six files database1.txt, database2.txt, database3.txt, database4.txt, database5.txt and database6.txt?

 

Ans:- database5.txt

 

 

                                          Week 2

 

Q. Consider finding all the YouTube links on a web page. What is the video      for the second YouTube link on the web page http://www.dukelearntoprogram.com/course2/data/manylinks.html about?

 

Ans:- Turkeys, Ducks and Quails

 

Q. Consider the following mystery method.

    

public String mystery(String dna) {

  int pos = dna.indexOf("T");

  int count = 0;

  int startPos = 0;

  String newDna = "";

  if (pos == -1) {

    return dna;

  }

  while (count < 3) {

    count += 1;

    newDna = newDna + dna.substring(startPos,pos);

    startPos = pos+1;

    pos = dna.indexOf("T", startPos);

    if (pos == -1) {

      break;

    }

  }

  newDna = newDna + dna.substring(startPos);

  return newDna;

}

 

Ans:- The method mystery is given a string and it returns a string which is the same string but with the first three T’s removed

 

Q. Use the following data file to answer this question: http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. How many genes are in this file?

 

Ans:- 69

 

Q. Use the following data file to answer this question: http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. How many genes in this file are longer than 60?

 

Ans:- 23

 

Q. Use the following data file to answer this question: http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. How many genes in this file have cgRatio greater than 0.35?

 

Ans:- 40

 

Q. Use the following data file to answer this question which represents one long strand of DNA: http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. How many times does the codon CTG appear in this strand of DNA?

 

Ans:- 224

 

Q. Use the following data file to answer this question: http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. What is the length of the longest gene in the collection of genes found in this file?

 

Ans:- 489

 

 

                                           Week 3

 

Q. 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.

 

Ans:- 17

 

Q. 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.)

 

Ans:- Germany

 

Q. 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.

 

Ans:- 40

 

Q. 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.)

 

Ans:- 20:51:00

 

Q. 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.

 

Ans:- 16

 

Q. 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.

 

Ans:- 80.1964

 

Q. 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.

 

Ans:-72.593

 

Q. Run your program from programming exercise Parsing Weather Data to determine which day of the year had the coldest temperature in 2013.

 

Ans:- January 23, 2013

 

Q. 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)

 

Ans:- 19.0

 

                                                    Week 4

 

Q. What is the rank of the girl’s name “Emily” in 1960?

 

Ans:- 251

 

Q. What is the rank of the boy’s name “Frank” in 1971?

 

Ans:- 54

 

Q. What is the girl’s name of rank 350 in 1980?

 

Ans:- Mia

 

Q. What is the boy’s name of rank 450 in 1982?

 

Ans:- Forrest

 

Q. Suppose Susan was born in 1972. Based on her name's rank in 1972, what would her name be if she were born in 2014 (that is, what name in 2014 had the same rank that "Susan" had in 1972)?

 

Ans:- Addison

 

Q. Suppose Owen was born in 1974. Based on his name's rank in 1974, what would his name be if he were born in 2014 (that is, what name in 2014 had the same rank that "Owen" had in 1974)?

 

Ans:- Leonel

 

Q. In which year from 1880 to 2014 does the girl’s name "Genevieve" have the highest rank (over all the data files)?

If there is more than one year with the highest rank, choose the earliest one.

 

Ans:- 1914

 

Q. In which year from 1880 to 2014 does the boy’s name "Mich" have the highest rank (over all the data files)?

If there is more than one year with the highest rank, choose the earliest one.

 

Ans:- 1960

 

Q. What is the average rank of the girl’s name "Susan" over all the data files?

Give the answer to two decimal places.

Ans:- 173.51

 

Q. What is the average rank of the boy's name "Robert" over all the data files?

Give the answer to two decimal places.

 

Ans:- 10.75

 

Q. What is the total number of girls born in 1990 with names ranked higher than the girl's name "Emily" in 1990?

Give the answer without any commas or decimal points.

 

Ans:- 323200

 

Q. What is the total number of boys born in 1990 with names ranked higher than the boy's name "Drew" in 1990?

Give the answer without any commas or decimal points.

 

Ans:- 1498074

 

 


For video description of answers plz visit our youtube channel

https://youtu.be/FiY0WLJ64oY 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Comments

  1. Plz make all four courses of opps...

    ReplyDelete
    Replies
    1. which course answers you want

      Delete
    2. functions and conditionals week 1 answers plz

      Delete
    3. do video and blog about all related to computer courser like vital one like python c c++ java java script php html

      Delete
  2. Week 1
    1.What is the longest side in the shape made from the file dataset1.txt whose content are shown below (just give to two decimal places)
    -3,3
    -4,-3
    4,-2
    6,5

    2. What is the largest perimeters of the shape in files dataset1.txt, dataset2.txt, dataset3.txt, dataset4.txt, dataset5.txt, dataset6.txt(just make two decimal places)?

    3. What is the largest perimeters of a shape made from the shape in files
    example1.txt, example2.txt, example3.txt, example4.txt
    (Just give two decimal places)?

    Plz give ans..

    ReplyDelete
    Replies
    1. Yeah I too need these answers...plz give answers

      Delete
  3. i haven't actually done this question you can leave the question and see my blogpost all answers are provided you will pass this course......

    ReplyDelete
  4. What is the largest perimeter of a shape made from the shapes in files dataset1.txt, dataset2.txt, dataset3.txt, dataset4.txt, dataset5.txt, and dataset6.txt (just give to two decimal places)?

    ReplyDelete
  5. Perimeter of dataset1.txt = 30.64
    Perimeter of dataset2.txt = 30
    Perimeter of dataset3.txt = 43.98
    Perimeter of dataset4.txt = 59.45
    Perimeter of dataset5.txt = 62.65
    Perimeter of dataset6.txt = 55.96

    so the largest perimeter is of dataset5.txt which is 62.65

    ReplyDelete
  6. Hi! greetings from Mexico.

    For the Calculating the Perimeter of a Shape.(Week 1) This is The code Finished :).

    https://github.com/Tarek-Mostafa/Java-Programming-Solving-Problems-with-Software/blob/master/Week%201/PerimeterAssignmentRunner.java


    My Answers:

    What is the perimeter of the shape made from the file datatest1.txt whose contents are shown below (just give to two decimal places)?

    -3,3

    -4,-3

    4,-2

    6,5

    Ans:- 30.64


    What is the average length of a side in the shape made from the file datatest1.txt whose contents are shown below (just give to two decimal places)?

    -3,3

    -4,-3

    4,-2

    6,5

    Ans.- 7.66


    What is the longest side in the shape made from the file datatest1.txt whose contents are shown below (just give to two decimal places)?

    -3,3

    -4,-3

    4,-2

    6,5

    Ans- 9.21


    ReplyDelete
  7. Can you do Java Programming: Arrays, Lists, and Structured Data next?

    ReplyDelete

Post a Comment

Popular posts from this blog

coursera answers : Google cloud platform fundamentals for AWS professionals.

Coursera Answer : Code Yourself! An Introduction to Programming.