Google IT Python Professional Certificate: Debugging and Solving Software Problems Answers/Tips

preview_player
Показать описание
This video has answers, tips and guidance on the assessments in Google's IT courses on Coursera. Any part that is not mentioned in this video can be solved if you read the instructions properly. This guide and the answers and tips included, should only be used to reflect on the test after you have taken it. We do not condone nor encourage cheating or copying of any kind for any assessment graded or not.
---------------------------------------------------
Google IT Automation with Python Professional Certificate
---------------------------------------------------
---------------------------------------------------
*****IMPORTANT*****: Since Angle Brackets can't be used in YouTube descriptions, they have been marked as "***(***" for "less than" and ***)***" for "greater than".

#!/usr/bin/env python3
import csv
import datetime
import requests

def get_start_date():
"""Interactively get the start date to query for."""

print()
print('Getting the first start date to query for.')
print()
print('The date must be greater than Jan 1st, 2018')
year = int(input('Enter a value for the year: '))
month = int(input('Enter a value for the month: '))
day = int(input('Enter a value for the day: '))
print()

def get_file_lines(url):
"""Returns the lines contained in the file at the given URL"""

# Download the file over the internet

# Decode all lines into strings
lines = []
return lines

def get_same_or_newer(start_date):
"Returns the employees that started on the given date, or the closest one."

data = get_file_lines(FILE_URL)
lista = list(reader)

# We want all employees that started at the same date or the closest newer
# date.To calculate that, we go through all the data and find the
# employees that started on the smallest date that 's equal or bigger than
# the given start date.

min_date_employees = []
row_date = []

for row in lista:
return row_date, min_date_employees
def list_newer(start_date):
start_date, employees = get_same_or_newer(start_date)
for i in range(0, len(start_date)):
print("Started on {}: {}".format(start_date[i], employees[i]))

---------------------------------------------------
Any copyrighted content that is mentioned in this or any other video belongs to their respective owners and this video is made for the sole purpose of education and has no intent to break any rules, regulations, guidelines, or laws of any organization or country. ---------------------------------------------------
Coursera Google Guide is a YouTube channel focused around providing tips, guides and answers for Google's IT Professional Certificate Programs including the Google IT Support Professional Certificate course and Google IT Automation With Python Professional Certificate course to provide guidance and mentorship to those who are seeking help with the courses.
---------------------------------------------------
Our channel, including but not limited to, its answers, guides and videos, are not meant to be used to cheat or otherwise gain the Coursera platform. They are strictly for educational, informational purposes with the intent of being used after the examination in order to reflect and improve.
Рекомендации по теме
Комментарии
Автор

There have been some people reporting issues with the code in the video. The code in the video and the description have been verified to work at the time the video was published.

I no longer have access to the course and have no way to ensure that the code still works. Follow all steps properly and if you are still experiencing issues, try looking on the forums and if there are further issues, contact Quiklabs or Coursera support.

Thank you.

courseragoogleguide
Автор

fun fact: you... you don't need to do any of this at all... just move the line that calls data out of the get_same_or_newer function and put it in the list_newer function. Then just add in another param for get_same_or_newer function to include data and pass in the data. complicated code or not... 99% of the time it's literally just calling the website over and over again. just cache it bro...

じゅげむ-sb
Автор

Im getting an error that says you cant do len(start_date) because object of type datetime.datetime has no len

aaronschofield
Автор

Hi, it looks like your editor cut off some of the code where it says datetime.datetime.s$. Cheers

Lorenzo
Автор

I couldn't solve this one. Please help me. Can you send me the correct code?

aravindantr
Автор

Hii... Actually in the 2nd script
get_same_or_newer ()
datetime.datetime.s$ in striped
Please can u send a complete line for that

gauravjain
Автор

getting syntax error in datetimme.datetime.s$

abhishekshag
Автор

facing this issue, can you please help - (changed name of the file to new.py, for testing)
Traceback (most recent call last):
File "./new.py", line 75, in <module>
main()
File "./new.py", line 72, in main
list_newer(start_date)
File "./new.py", line 64, in list_newer
start_date, employees =
File "./new.py", line 59, in get_same_or_newer
for i in range(0, len(start_date)):
TypeError: object of type 'datetime.datetime' has no len()

chaitanyachhibba
visit shbcf.ru