User Posts: editor
0
Generate a random 6-digits number in Python.
0

Input: Output: import random number = random.randint(100000, 999999) print(number) Prompt: Below is an instruction that describes a task. Write a ...

0
Create a Python neural network model that takes in a given trajectory of stock prices and predicts the stock price for the next day.
0

Input: Output: import numpy as np import tensorflow as tf def create_model(): model = tf.keras.Sequential([ tf.keras.layers.Dense(64, ...

0
Develop an algorithm in Python to print Fibonacci series up to a given number.
0

Input: Output: def fibonacci(n): a = 0 b = 1 if n < 0: print("Incorrect input") elif n == 0: return a elif n == 1: ...

0
Write a Python program to query Twitter to get the most recent tweets from a user.
0

Input: username: @elonmusk Output: import tweepy # Authenticate to Twitter auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET") ...

0
Rewrite the following Python code by introducing list comprehensions.
0

Input: even_numbers = for i in range(1,21): if i % 2 == 0: even_numbers.append(i) Output: even_numbers = Prompt: Below is an instruction ...

0
Make the following code snippet into a function in Python3 capable of solving Any Sudoku puzzle
0

Input: board = [ , , , , , , , , ] Output: def solve_sudoku(board): # Utility function to find vacant cells ...

0
Write a function in Python to calculate the sum of the digits in a given number.
0

Input: Output: def sum_digits(num): total = 0 while num > 0: digit = num % 10 total += digit num = num // 10 return ...

0
Create a function in Python that takes two parameters and prints out the larger of them.
0

Input: parameter_1 = 7 parameter_2 = 9 Output: def printMax(parameter_1, parameter_2): if parameter_1 > parameter_2: print(parameter_1) ...

0
Take the list of people below and create a Python dictionary with the names as keys and the ages as values.
0

Input: John (20), Jane (40), Alex (18), Peter (45) Output: people_dict = {'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45} Prompt: Below is an ...

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