Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Web development and programming

191828 questions • Page 3656 / 3837

import numpy as np import matplotlib.pyplot as plt def mysin(x, tol=1e-8): \"\"\
import numpy as np import matplotlib.pyplot as plt def mysin(x, tol=1e-8): """ compute sin(x) by summing taylor expansion at 0, sin(x) = x - x^3/3! + x^5/5! +.... + (-1)^k*x^(2k+1…
import numpy as np import random rnstart = random.randint(0, 10) print(rnstart)
import numpy as np import random rnstart = random.randint(0, 10) print(rnstart) x = np.ones((10,2)) for row in x: row[0] = rnstart row[1] = rnstart + 100 rnstart = random.randint(…
import numpy as np import scipy.linalg as linalg #import matplotlib.pyplot as pl
import numpy as np import scipy.linalg as linalg #import matplotlib.pyplot as plt #------------------------------------------ def vandermonde_matrix(n, datafile="vector_data.txt")…
import numpy as np import scipy.linalg as linalg def least_square_poly(xData, yD
import numpy as np import scipy.linalg as linalg   def least_square_poly(xData, yData, m, x): ''' least square fit (xData, yData) using a degree m polynomial, return the polynomia…
import numpy as np import scipy.linalg as linalg import matplotlib.pyplot as plt
import numpy as np import scipy.linalg as linalg   import matplotlib.pyplot as plt import least_square as LS #then call the function least_square_poly() as LS.least_square_poly() …
import numpy as np import scipy.linalg as linalg import matplotlib.pyplot as plt
import numpy as np import scipy.linalg as linalg   import matplotlib.pyplot as plt import csv #needed to read csv file import least_square as LS #will use the least square functio…
import org.jfree.data.xy.AbstractXYDataset; import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.AbstractXYDataset; import org.jfree.data.xy.XYDataset; import java.util.ArrayList; import java.util.List; public class PolyDataset extends AbstractXYDatas…
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertion
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class StudentTest { // Test that a class gets added to the student's Classes list // Create a …
import os def LabA(): no_of_shares=int(input(\"how many shares to be bought : $\
import os def LabA(): no_of_shares=int(input("how many shares to be bought : $")) pp_share=int(input("Price per share : $")) broker_comm=int(input("percentage commission of broker…
import os number = [] count = 0 sum = 0 fName =input(\"Enter the file name: \")
import os number = [] count = 0 sum = 0 fName =input("Enter the file name: ") if os.path.exists(fName): with open(fName, 'rb') as f: try: for line in f: number.append(int(line)) c…
import pandas as pd import matplotlib import matplotlib.pyplot as plt import sea
import pandas as pd import matplotlib import matplotlib.pyplot as plt import seaborn as sns import numpy as np from sklearn.manifold import TSNE from IPython.core.interactiveshell…
import pygame,svs pygane.init() a = input(\"Please enter the filename of the bac
import pygame,svs pygane.init() a = input("Please enter the filename of the background image:") b pygane.inage.load(a) (width, height) = b.get_rect().size background display = pyg…
import pythongame from pythongame.locals import *pythongame.int() int no.of play
import pythongame from pythongame.locals import *pythongame.int() int no.of players(); screen=pythongame.visible_players((number, //to show the name of players player name = pytho…
import pythongame from pythongame.locals import* pythongame.int(); int number of
import pythongame from pythongame.locals import* pythongame.int(); int number of players; screen=pythongame.visible_players((number, //to show the name of players player name = py…
import pythongame from pythongame.locals import*pythongame.init(); number_of_pla
import pythongame from pythongame.locals import*pythongame.init(); number_of_players = 0 screen=pythongame.visible_players((number, //to show the name of players player name = pyt…
import random def getSuitName (suit): suitname = \"\" if (suit == \'d\'): suitna
import random def getSuitName (suit): suitname = ""    if (suit == 'd'): suitname = "Diamonds" elif (suit == 'h'): suitname = "Hearts" elif (suit == 'c'): suitname = "Clubs" else:…
import random def main(): print(\'ROCK PAPER SCISSORS in Python\') print() print
import random def main():     print('ROCK PAPER SCISSORS in Python')     print()     print('Rules: 1) Rock wins over Scissors.')     print(' 2) Scissors wins over Paper.')     pri…
import random def write(n): file=open(\'randnum.txt\', \'w\') for i in range(n):
import random def write(n): file=open('randnum.txt', 'w') for i in range(n): file.write(str(random.randint(0,999)) +' ') file.close() def read(): file=open('randnum.txt', 'r') i=0…
import random import math z = 23086243 random.seed(23086243) t = random.uniform(
import random import math z = 23086243 random.seed(23086243) t = random.uniform(0, 1) print(t) ching/2018/mad2502/hw/hw3.pdf Question 1. (2 points) Write a Python program to numer…
import random import string Target=”Hello,world!” def mutate(parent1, parent2):
import random import string Target=”Hello,world!” def mutate(parent1, parent2):    child_dna = parent1['dna'][:]    # Mix both DNAs    start = random.randint(0, len(parent2['dna']…
import random import sys def nqueens(nr): show(min_conflicts(list(range(nr)), nr
import random import sys def nqueens(nr):    show(min_conflicts(list(range(nr)), nr), nr) #print the solution if it exists def show(soln, nr):    for i in range(nr):        row = …
import random import time deforderedSequentialSearch(alist, item): pos = 0 found
import random import time deforderedSequentialSearch(alist, item):     pos = 0     found = False     stop = False     while pos < len(alist) and not found and notstop:         …
import re from random import randint def rand_list(): ans = list() for i in rang
import re from random import randint def rand_list(): ans = list() for i in range(6): ans.append(randint(1, 59)) # print(ans) return ans def comparelist(x, y): z = list(set(x).uni…
import recursion.Recursion; // Uncomment this block of code to test Activity 4 /
import recursion.Recursion; // Uncomment this block of code to test Activity 4 /* System.out.println(" Activity 4:"); // Test factorial System.out.println("Factorial:"); for (int …
import static java.lang.System.*; public class Social { private String socialNum
import static java.lang.System.*; public class Social { private String socialNum; //Hold the total of the digits private int sum; private int one, two, three; public Social() {soc…
import static org.junit.Assert. import java.util.ArrayList import org.junit.Befo
import static org.junit.Assert. import java.util.ArrayList import org.junit.Before: import org junit.Testi public class MaxHeapTest private MaxHeap heap: eBefore public void setUp…
import staticArray.ArrayList; import java.util.Date; import java.util.HashSet; i
import staticArray.ArrayList; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Scanner; import javax.swing.text.html.HTMLDocument.Iterator;…
import stdlib.StdAudio; public class PlayChords { public static void playChord(d
import stdlib.StdAudio; public class PlayChords { public static void playChord(double duration, double... frequencies){ final double sliceCount = (int) (StdAudio.SAMPLE_RATE * dur…
import string from graphics import * # tells the user what the program does def
import string from graphics import * # tells the user what the program does def printGreeting(): print "This program finds hailstone sequences of numbers that you input." print "T…
import sys and string Make sure correct number of command-line args were entered
import sys and string Make sure correct number of command-line args were entered, exiting if not Open the file for reading Read the lines in the file into a list of strings (don't…
import traceback #countingsort: takes as input a list of Student objects, and #a
import traceback #countingsort: takes as input a list of Student objects, and #a character houseOrYear, which is 'h' If we are sorting the #students by house, or 'y' if sorting by…
import uagame import random def main(): #set up the list list_of_words=[\"apple\
import uagame import random def main(): #set up the list list_of_words=["apple","banana","kiwi","mango","pineapple","watermelon"] word=random.choice(list_of_words) print(word) lis…
import unittest from sys import argv \'\'\' The eight queens puzzle is the probl
import unittest from sys import argv ''' The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus,…
important note : using dynamic arrays. You must ask the user for the number of c
important note : using dynamic arrays. You must ask the user for the number of candidates and then create the appropriate arrays to hold the data Write a program that allows the u…
importjava.awt.*; import java.awt.event.*; import javax.swing.*; public class La
importjava.awt.*; import java.awt.event.*; import javax.swing.*; public class Lab07q2extends JFrame{ JPanel centerPanel = new JPanel(); JPanel northPanel = new JPanel(); JPanel so…
importjava.util.*; importjavax.swing.*; importjava.lang.*; publicclass PetAdvice
importjava.util.*; importjavax.swing.*; importjava.lang.*; publicclass PetAdvice { publicstatic void main(String []args) { String response = JOptionPane.showInputDialog(null, "Doy…
importjava.util.Scanner; public class Test45 { public static void main(String[]
importjava.util.Scanner; public class Test45 { public static void main(String[] argv){        // definevariables        int a = 6;        int b = 15;        int option;           …
importjava.util.Scanner; public class TruffleDriver { public static void main(St
   importjava.util.Scanner; public class TruffleDriver {    public static void main(String[] args) { int[] count; count = new int[4];    for (int index = 0; index<4; index++)  …
importjava.util.Scanner; public class sum3{ Scannerkeyboard; publicvoid getInput
importjava.util.Scanner; public class sum3{     Scannerkeyboard;     publicvoid getInput()     {         keyboard = newScanner(System.in);        System.out.println("Enter a posit…
importjavax.swing.*; import java.lang.*; public class Password { publicstatic vo
importjavax.swing.*; import java.lang.*; public class Password { publicstatic void main(String[] args)throws Exception { charfirstC, secondC, thirdC, fourthC; String response = JO…
importjavax.swing.*; publicclass Admission2 { publicstatic void main(String[] ar
importjavax.swing.*; publicclass Admission2 { publicstatic void main(String[] args) { String response = JOptionPane.showInputDialog(null, "Type in your GPA "); String test = JOpti…
importjavax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabe
importjavax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JSlider; public class Fan { public static void main(String args[]) {     JFra…
improve and rewrite the discussion topic post you made in 600-1000 words, using
improve and rewrite the discussion topic post you made in 600-1000 words, using at least two more references. Targeted marketing was a matter of course in the village, as the one …
in ( C++ ) 1a) Write a program that reads in file \"datain.txt\" containing numb
in (C++) 1a) Write a program that reads in file "datain.txt" containing numbers, and creates an output file containing the square of those numbers. For example, if the input file …
in ( Java programming language) please help me with it thank you Post lab A High
in ( Java programming language) please help me with it thank you Post lab A HighSchool application has a super class: Person. Using inheritance, you will create two new classes, T…
in (C++ please) Modify the code in section 23.7 to use a regex to recognize a So
in (C++ please) Modify the code in section 23.7 to use a regex to recognize a Social Security number or a UIN, with or without hyphens. A valid Social Security number or UIN consi…
in 2 sentences for each question 1) Should data be considered a true corporate r
in 2 sentences for each question 1) Should data be considered a true corporate resource? Why or why not? Compare and contrast data to other corporate resources (capital, plant and…
in ArcGIS, Scenario: You start an edit session and see your feature template in
in ArcGIS, Scenario: You start an edit session and see your feature template in the Create Features window. However, you do not see any construction tools displayed at the bottom …
in Assembly language X86 processors starting with _asm{} Project No. 4 (loop str
in Assembly language X86 processors starting with _asm{} Project No. 4 (loop structures) Write assembly programs for each of the following. All functions must be written in assemb…
in BASIC PROGRAMMING LANGUAGE heres is the question: e. Your program will mainta
in BASIC PROGRAMMING LANGUAGE heres is the question: e. Your program will maintain the student information such as names, Id’s, and the exam1 score, exam2 score and exam3 score. I…