Web development and programming
191828 questions • Page 3591 / 3837
def main(): found = False search = input (\'Which one?\') student_file = open (\
def main(): found = False search = input ('Which one?') student_file = open ('s.txt', 'F') temp_file = open ('t. txt', 'w') descr = student_file. Readline() while descr l = ' ': n…
def main(): opts = get_commandline_options() world = generate_world(opts) report
def main(): opts = get_commandline_options() world = generate_world(opts) report_options(opts) blit(world, patterns.glider, 20, 20) run_simulation(opts, world) if __name__ == '__m…
def main(): opts = get_commandline_options() world = generate_world(opts) report
def main(): opts = get_commandline_options() world = generate_world(opts) report_options(opts) blit(world, patterns.glider, 20, 20) run_simulation(opts, world) if __name__ == '__m…
def max(a_array,size_of_array): index=0#initialize index maxNum=a_array[0]#initi
def max(a_array,size_of_array): index=0#initialize index maxNum=a_array[0]#initialize max number while index<size_of_array: if a_array[index]>maxNum: …
def monte_carlo_pi(N=1e+4): \"\"\" generate N # of random points (x,y), where x
def monte_carlo_pi(N=1e+4): """ generate N # of random points (x,y), where x and y are uniformly distributed on [-1,1], count the n # of points that are inside the disk center at …
def names(): with open(\'names.txt\') as f: words = [i.strip().lower() for i in
def names(): with open('names.txt') as f: words = [i.strip().lower() for i in f.read().split()] return dict(zip(words[:-1], words[1:])) is what i have s…
def num_space_runs1(s): \"\"\"Returns: The number of runs of spaces in the strin
def num_space_runs1(s): """Returns: The number of runs of spaces in the string s. A run is a collection of adjacent spaces. We need a non-space character in between to break up ru…
def partition (L, first, last) Pick L[first] as the \"pivot\" around which we pa
def partition (L, first, last) Pick L[first] as the "pivot" around which we partition the list p first for current in range Cp+1, last-1): if L[current] LCpl swap CL, current, p+1…
def powerset (A) \"\"Build the powerset of A Given a set A, the powerset of A is
def powerset (A) ""Build the powerset of A Given a set A, the powerset of A is the set of all subsets of A. Hint: recursion, anyone? no, really, you need to use recursion see lect…
def print_index_of_item(lst, item): \"\"\"Print the index of an item in a list,
def print_index_of_item(lst, item): """Print the index of an item in a list, followed by the item. If the item appears multiple times in the list, return the index and the item fo…
def read_board(s): Given a string containing lines of either player pieces or pe
def read_board(s): Given a string containing lines of either player pieces or periods, pick apart the string and generate the corresponding board. Blank lines must be ignored, but…
def read_file(fp): csv_fp = csv.reader(fp) D ={} next(csv_fp, None) for L in csv
def read_file(fp): csv_fp = csv.reader(fp) D ={} next(csv_fp, None) for L in csv_fp: manufacturer = L[46] year = L[63] city_fuel = L[4] highway_fuel = L[34] if year != 2017: if ma…
def recursive_selSort (L): \" \"Selection sort, recursive argmax version. This s
def recursive_selSort (L): " "Selection sort, recursive argmax version. This solution is suboptimal for efficiency, because of all the cloned lists you have to create (which requi…
def reverse_add(low, high): \'\'\' Executes the reverse and add algorithm for in
def reverse_add(low, high): ''' Executes the reverse and add algorithm for integers in the range low to high. For example, if low is 10 and high is 50, then the function would run…
def scrabble score(words): sumo for letter in vords sum- sumscrabble_map.get(let
def scrabble score(words): sumo for letter in vords sum- sumscrabble_map.get(letter) return sum def read words (file): vordsth for line in open(file): line line.strip) words[1ine-…
def seq_numbers(string): count=3 #Create a function Constants that will check if
def seq_numbers(string): count=3 #Create a function Constants that will check if the string/ password #has no sequence of 3 or more numbers. If the string has does not, then retur…
def show_table(table): Given table as a list of lists of strings, create and ret
def show_table(table): Given table as a list of lists of strings, create and return a formatted string representing the 2D table. Follow these requirements (examples below): o Eac…
def simple _board(size): Given a size, produce a square \"ASCII art\" grid repre
def simple _board(size): Given a size, produce a square "ASCII art" grid representing a game board (like fou checkers or chess). The game board will use dashes (-) for the horizon…
def simple_pig_latin(input, sep= \" \", end= \"middot\"): Accept a string input,
def simple_pig_latin(input, sep= " ", end= "middot"): Accept a string input, which might include multiple words separated by a separator sep and perform the following steps: Find …
def syllable_count(word): \"\"\" Returns the number of syllables in the word. Fo
def syllable_count(word): """ Returns the number of syllables in the word. For this exercise, assume that syllables are determined as follows: Each sequence of vowels a e i o u y,…
def timing(minutes): # probably you should change these before returning, right?
def timing(minutes): # probably you should change these before returning, right?... num_fortnights = 0 num_days = 0 num_hours = 0 num_minutes = 0 if minutes >= 20160: num_fortn…
def toCSV(self) rightarrow str: \"\"\" pre: none post: returns a string with the
def toCSV(self) rightarrow str: """ pre: none post: returns a string with the attributes of the course separated by a comma in the order: semester, year, department, number, instr…
defination of class register(header file) class cashRegister { public: int getCu
defination of class register(header file) class cashRegister { public: int getCurrentBalance() const; void acceptAmount(int amountIn); cashRegister(int cashIn = 500); private: int…
define a class called odd-numbered that has the following property 1.it has one
define a class called odd-numbered that has the following property 1.it has one private integer number modd which it all the time an odd and positive number 2.has a default constr…
define a class called odd-numbered that has the following property 1.it has one
define a class called odd-numbered that has the following property 1.it has one private integer number modd which it all the time an odd and positive number 2.has a default constr…
define a class called time. The class should have four datamembers: hour, minute
define a class called time. The class should have four datamembers: hour, minute, second ans AM/PM flag. a. it should have a constructor to initialize these data members.Remember …
define a class called utilities.... Define a class called Utilities which has th
define a class called utilities.... Define a class called Utilities which has the following public methods: Define a method called count that takes two parameters named data and c…
define a class called “Triangle” which has two private properties: base (float),
define a class called “Triangle” which has two private properties: base (float), and height (float). Define proper functions (including constructors, get/set etc., destructor) to …
define a class name Employee whose objects are records for employee. Derive this
define a class name Employee whose objects are records for employee. Derive this class from the class person given in the listing 8.1. An employee record inherits an employee's na…
define a class rectangleType that stores length and width of a rectangle. a.) Ov
define a class rectangleType that stores length and width of a rectangle. a.) Overload +,-,<,>,<=,>=,==,!=operators for your class. For example the following should be…
define a function drawCircle. This function should expect a Turtle object, the c
define a function drawCircle. This function should expect a Turtle object, the coordinates of the circle's center point, and the circle's radius as arguments.The function should d…
define a new class, called MP3_Player, that manages a collection of Song objects
define a new class, called MP3_Player, that manages a collection of Song objects. Since you don't know how many songs your player has, you should utilize the ArrayList to manage t…
define a new class, called MP3_Player, that manages a collection of Song objects
define a new class, called MP3_Player, that manages a collection of Song objects. Since you don't know how many songs your player has, you should utilize the ArrayList to manage t…
define a simple language using a deterministic finite automaton (DFA), a regular
define a simple language using a deterministic finite automaton (DFA), a regular expression (RE) and a context free grammar (CFG). The language is that consisting of a single emai…
define the header file(.h file) and the implementation file(.cpp file) for the c
define the header file(.h file) and the implementation file(.cpp file) for the class represented by the UML class diagram shown below. TVShow(std::string name,std::string network)…
define this class in JAVA 1. Define a class called Ninja Make instance variables
define this class in JAVA 1. Define a class called Ninja Make instance variables for name, dojoName, and killCount. b. create a static variable for totalKills yet". e, create a de…
defined the class boxType by extending the definition of the class rectangleType
defined the class boxType by extending the definition of the class rectangleType. In this exercise, derive the class boxType from the class rectangleType, defined in Exercise 1, a…
defined the struct studentType to implement the basic propertiesofastudent.Defin
defined the struct studentType to implement the basic propertiesofastudent.Definetheclass studentTypewiththesame components as the struct studentType, and add member functions to …
defmoveTower(height,fromPole, toPole, withPole): if height >= 1: moveTower(heigh
defmoveTower(height,fromPole, toPole, withPole): if height >= 1: moveTower(height-1,fromPole,withPole,toPole) moveDisk(fromPole,toPole) moveTower(height-1,withPole,toPole…
delay (500) int Punetion (intx, int y) int zesult: zeturn result Parameters pass
delay (500) int Punetion (intx, int y) int zesult: zeturn result Parameters passed to vol t nothing s returned.any C datatype Function name Function int x,int Y) int result Return…
delete Row creates Ref - use Indirect formula but can\'t get it to work Hi I hav
delete Row creates Ref - use Indirect formula but can't get it to work Hi I have a sheet called People where all members of club are listed. I want Team Leaders to be able to dele…
delete the variable.txt file Solution A text variable is an item you insert in y
delete the variable.txt file
deleted 2. Converting a DFA such as the following to a regular expression requir
deleted 2. Converting a DFA such as the following to a regular expression requires us to develop regular expressions for limited sets of paths -- those that take the automaton fro…
deleted Cache Design: Two-way set associative cache with 5-word blocks Explain h
deleted Cache Design: Two-way set associative cache with 5-word blocks Explain how the Cache Design accesses words 89, 90, 51, 92, 25, in the order listed Assume an LRU replacemen…
deleting and sending, how do we do it in C linked list . Library Book Management
deleting and sending, how do we do it in C linked list . Library Book Management System will be based on the data type struct book as defined below. struct book{ int ID; char …
demonstrates each method in ule below and write a driver program (progressively
demonstrates each method in ule below and write a driver program (progressively developed) to test the class (verify that all the methods function properly). The default (n parame…
demostrate the folllowing methods , writeArray and readArray,in a program: publi
demostrate the folllowing methods ,writeArray and readArray,in a program: public static void readArray(String fileName, int[] content)throws Exception{ File f = new Fi…
den ataba This exercise is designed to introduce the concept of gruceuresin C++,
den ataba This exercise is designed to introduce the concept of gruceuresin C++, to give further practice with strings and grrays to review the idea ofsorting and to introduce (in…
dent Services FDU Community Conlelll UU Multiple Not allowed. This test can only
dent Services FDU Community Conlelll UU Multiple Not allowed. This test can only be taken once. Attempts Remaining Time: 2 hours, 16 minutes, 02 seconds v Question Completion Stat…
departmentstore: package departmentstorepkg; import java.util.ArrayList; public
departmentstore: package departmentstorepkg; import java.util.ArrayList; public class DepartmentStore { private static final int DEFAULT_SIZE = 10; private StaffMember [] myEmp…
Subject
Web development and programming
Use Browse or pick another subject.