User Posts: editor
0
Generate a Python code for crawling a website for a specific type of data.
0

Input: website: www.example.com data to crawl: phone numbers Output: import requests import re def crawl_website_for_phone_numbers(website): response ...

0
Create a Python list comprehension to get the squared values of a list [1, 2, 3, 5, 8, 13].
0

Input: Output: ] Prompt: Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: ...

0
Write an algorithm in Python 3 that calculates the factorial of a number.
0

Input: Not applicable Output: def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) Prompt: Below is an instruction that describes ...

0
Implement a Python function that will take two strings and return true if the first string contains the second.
0

Input: query = "catering" word = "cat" Output: def check_contains(query, word): if query.find(word) != -1: return True return False result ...

0
Write a Python program to find all the numbers divisible by a certain number within a certain range.
0

Input: int m=36, int n=74, int divisor=6 Output: def find_numbers_divisible_by(m, n, divisor): divisible_numbers = for i in range(m, n+1): ...

0
Collate a machine learning model in Python that distinguishes between cats and dogs.
0

Input: A dataset of 800 images of cats and dogs Output: import numpy as np import keras from keras.layers import Dense, Conv2D, MaxPooling2D, Dropout, ...

0
Implement a decision-making algorithm for a rock-paper-scissors game using Python.
0

Input: Output: # Rock, paper, scissors game! def play_game(player1, player2): # Define the winning rules rules = {'rock': 'scissors', 'scissors': ...

0
Develop a function in Python that prints out the Pascal’s triangle for a given number of rows.
0

Input: Output: def pascal_triangle(n): trow = y = for x in range(max(n, 0)): print(trow) trow= return n>=1 ...

0
Write a Python program to calculate the average of a list of positive integers and output the result.
0

Input: List of positive integers: Output: list_of_positive_integers = total = sum(list_of_positive_integers) avg = total/len(list_of_positive_integers) ...

0
Write a python program to extract the non-vowel words in a sentence.
0

Input: This machine learning project is challenging. Output: def extract_words(sentence): non_vowel_words = words = sentence.split() vowels = ...

0
Generate a Python program that adds two then doubles the result.
0

Input: Output: def double_add(num1, num2): return (num1 + num2) * 2 Prompt: Below is an instruction that describes a task. Write a response that ...

0
Create a Python program to sort and print out the elements of an array of integers.
0

Input: Output: arr = arr.sort() print(arr) # Output: Prompt: Below is an instruction that describes a task. Write a response that appropriately ...

User Deals: editor
Browsing All Comments By: editor
vesaire.com
Logo
Compare items
  • Total (0)
Compare
0
Shopping cart