Комментарии:
Thanks for linking this video John!
ОтветитьI loved this thank you so much. Your explanations were perfect , detailed yet to the point!
ОтветитьThis should be the first video recommended when you search for making API requests. Went through the video quickly but will be watching slowly tomorrow while coding alongside the video :)
ОтветитьSimple and superb!!!
ОтветитьI am a complete beginner here. Just to understand what you did in laymans term. You basically mirrored the website into python and extracted information from it. Is this correct? And somehow, you also made the data in JSON format for ease of interpretation by Python.
ОтветитьThis was a very helpful walk-through - Thanks for the great content! :)
ОтветитьLove you man, i saw like 10 videos about APIs request and data pull. All of them with over 1M viewers.. and they all just show how to code the request and not anything else, which is equal to nothing, what a waste of time. This video is simple, concrete, and right to the point. You surely deserve more viewers.
Ответить1a parte do 4 corrigida -> no str_(self)
class Car:
def _init_(self,plate_number,fuel_available,fuel_full_cap,fuel_type):
self.plate_number = plate_number
self.fuel_available = fuel_available
self.fuel_full_cap = fuel_full_cap
self.fuel_type = fuel_type
def refill(self,liters):
if self.fuel_available + liters > self.fuel_full_cap:
self.fuel_available = self.fuel_full_cap
else:
self.fuel_available += liters
def _str_(self):
return "{}\nFuel available: {}\nFuel type: {}".format(self.plate_number,self.fuel_available,self.fuel_type)
3 corrigida!!:
def normalization(list):
newList = []
if len(list) <= 1:
return ""
else:
for i in range(len(list)):
newList.append((list[i]-statistics.mean(list))/statistics.stdev(list))
return newList
4
class Car:
def _init_(self,plate_number,fuel_available,fuel_full_cap,fuel_type):
self.plate_number = plate_number
self.fuel_available = fuel_available
self.fuel_full_cap = fuel_full_cap
self.fuel_type = fuel_type
def refill(self,liters):
if self.fuel_available + liters > self.fuel_full_cap:
self.fuel_available = self.fuel_full_cap
else:
self.fuel_available += liters
def _str_(self):
return "{}\nFuel Available: {}\nFuelType: {}".format(self.plate_number,self.fuel_available,self.fuel_type)
corrigi a 3 para isto (para incluir math. e statistics.). Só que agora dá um erro a dizer: "'float' object is not iterable"
import math
import statistics
def normalization(list):
newList = []
if len(list) <= 1:
return ""
else:
for i in range(len(list)):
newList += (list[i]-statistics.mean(list))/math.sqrt(statistics.mean(list))
return newList
3
def normalization(list):
newList = []
if len(list) <= 1:
return ""
else:
for i in range(len(list)):
newList += (list[i]-mean(list))/sqrt(mean(list))
return newList
ainda não consegui fazer nenhum ahah nem com o chat :/
Ответитьi was able to do it, this is a great video!
lots of respect and love to you man!🌻
1)
def square_cross(num):
if num < 4:
return "The minimum size is 4"
if (num % 2) == 1:
return "Please provide an even number"
solution = ""
for i in range(num):
if (i == 0):
solution += "*" * num + "\n"
elif (i == (num - 1)):
solution += "*" * num
else:
solution += "*" + (num - 2) * " " + "*" + "\n"
3)
def create_dictionary_from_csv(filename, separator):
with open(filename, 'r') as file:
lines = file.readlines()
keys = lines[0].strip().split(separator)
dictionary = {}
for key in keys:
dictionary[key] = []
for line in lines[1:]:
values = line.strip().split(separator)
for i in range(len(keys)):
dictionary[keys[i]].append(values[i])
return dictionary
2)
def custom_operator(numbers):
length = len(numbers)
output = [2 * numbers[0]] # Double the first number
if length > 2:
for i in range(1, length - 1):
result = sum(numbers[:i] + numbers[i+1:]) * numbers[i]
output.append(result)
output.append(2 * numbers[-1]) # Double the last number
return output
1)
def square_cross(num):
if num < 4:
return "The minimum size is 4"
if (num % 2) == 1:
return "Please provide an even number"
solution = ""
for i in range(num):
if (i == 0):
solution += "*" * num + "\n"
elif (i == (num - 1)):
solution += "*" * num
else:
solution += "*" + (num - 2) * " " + "*" + "\n"
great video!!
ОтветитьUseful tutorial. Thanks.
ОтветитьThank you John , very helpful
Ответить