21 python
Q: One of the goals in this course is to interpret assembly language into machine language. The…
A: One of the goals in this course is to interpret assembly language into machine language. The…
Q: JAVA Create a program using JAVA that asks the user to enter the amount that he or she has budgeted…
A: ANSWER:-
Q: 4-Clique Problem The clique problem is to find cliques in a graph. A clique is a set of…
A: error 404
Q: Code a method in java called diffArList that: Takes two array lists of Strings arL1 & arL2 as input…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Write the HTML and the JavaScript code that validates a numeric input. The number entered by the…
A: Please find the answer below :
Q: Problem_#08] Determine the decimal value of the signed 2's complement form. (a) 10011001 (b)…
A:
Q: How can I fix my error in Python.
A: Error The error occurs because 'AxesSubplot' does not have a draw_confidence_ellipse method in its…
Q: This question does not have an answer???
A: The java program is given below:
Q: Use KMeans in Sklearn to do clustering and find the nearest cluster centroid for each SIFT feature;…
A: PYTHON OPEN CV We will create this vocabulary by randomly selecting tens or hundreds of thousands of…
Q: Convert 576.3648 to base 4
A: I'm just converting 576.3648 to base 4. One quaternary system is base 4. Use the digits 0, 1, 2, and…
Q: Define a recursive function createlntList for constructing a flat list of integers from a nested…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Which of the following is NOT a function in Python?
A: Python has a set of built-in functions. Python code can run dynamically with the help of this…
Q: A computer has main memory access time of 500 ns or 500 x 10-9 seconds and cache memory access of…
A: As per our guidelines we are supposed to answer?️ only one question. Kindly repost other questions…
Q: Which recursive method would return a value of 210 if result(7) was called? Question 1 options:…
A: The complete answer is below:
Q: n texting or tweeting, it’s not uncommon to shorten words to save time or space, as by omitting…
A: When texting or tweeting, it’s not uncommon to shorten words to save time or space, as by omitting…
Q: Match the codes to the correct outputs. x=(1,2,3) def name (): global x, summ return sum (x) summ=0…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Hash the given file (6,22,9,14,13,1,8) and use linear probing and the table size of 11. How many…
A:
Q: Python help, need to fill in what goes in "your response" portion Write a function called…
A: Completed Code: Following is the completed program: def electionResults(lst1, lst2): '''Python…
Q: Q.14 List and explain various implementation techniqués used for dialog modeling in UIMS.
A: Please find the detailed answer in the following steps.
Q: Write a complete C program that inputs marks of a student in 5 courses using any loop and writes…
A: The C code is given below with code and output screenshot 'Happy to help you ?
Q: Implement a class CountingArrayList that extends ArrayList and that counts the number of calls to…
A: Code for CountingArrayList.java : package countingarraylisttester; import java.util.ArrayList;…
Q: Project/folder name is LastName Web application consists of a single page titled "Your Name Wk 3"…
A: answer
Q: ets G = (rose, lily, tulip, daffodil, clematis, pansy, foxglove} W = {daisy, buttercup, dandelion,…
A: Dear Student, Intersection of two sets result in a set having only those values which are present in…
Q: Explain advantages of constructing user Interfaces with a - UIMS.
A:
Q: The following functions are all supposed to count how many times a certain base (represented as a…
A: Answer:
Q: Given the nested if-else structure below, what will be the value of x after code execution completes…
A: The complete answer is below:
Q: Question 1 Suppose P packets arrive simultaneously to a link at which three packets are currently…
A:
Q: What is task migratability?
A: Introduction In this question, we are asked about task migrabibility
Q: Q.4 Write short note on wider still.
A: Operating System "OS" System software that manages a computer's hardware and software resources and…
Q: blem 1: Recall that binary search trees enjoy O(ig(n)) search time complexity when the tree s fairly…
A: Answer: We have written the algorithm for the Balance or Unbalance Binary Search tree
Q: Use the attached C program front.c (compile it – see the instruction for using the c program,) and…
A: Code: import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; import…
Q: What is the put put of? print(int("one")) Runtime Error Syntax Error 0 1 O One
A: Answer Syntax error
Q: Q.14 List and explain various implementation techniqués used for dialog modeling in UIMS.
A: These question answer is as follows
Q: Write the following SQL Statements: 1. Write a SELECT statement that returns one row for each…
A: 1.
Q: Briefly summarize in your own words the five tenets of the Code of Fair Information Practices.
A: In this question we need to explain the five tenets of Code of Fair Information Practices related to…
Q: 1. Consider the following statements: P(x, y) = "3r ER such that Vy ER, x+y=0" Q(x, y) = "Vr Ry R…
A: Here, P(x,y) ="∃x ∈ R such that ∀y ∈ R, x + y = 0" There exists some value of x for every value of…
Q: What is SCSI? Is the SCSI Hard Disk is needed for a home purpose?
A: The answer to the question is given below:
Q: Describe the two paradigms (approaches) for architecture development. Mention at least one example…
A: The IEEE defines architectural design as "the process of defining a collection of hardware and…
Q: The following functions are all intended to check whether a string representing a dna sequence…
A: The following functions are all intended to check whether a string representing a dna sequence…
Q: What is GOMS? List and explain elements of GOMS.
A:
Q: What is SCSI? Is the SCSI Hard Disk is needed for home purpose?
A: SCSI stands for Small Computer Systems Interface.
Q: Case Study: Wish You Wood is a toy boutique located in the main shopping strip of a resort town near…
A:
Q: 1. Create a new project in BlueJ. 2. Create a class named LemonadeStand. 3. Create all methods and…
A: SOLUTION
Q: I wrote a Java Program named: MyJava Program.java o what is the command to compile my program? o…
A: 1) You will use the javac command to compile the program's Java source code must be compiled into…
Q: What is the output of the following code?
A: Dear Student, append() method only takes one argument but her two arguments 2 and "Scott" are…
Q: Given the following code: def boxString (content): n= len (content) if n -- 0: SENE return print…
A: Given code contains a function boxString() and content is given as input. Then if length of content…
Q: Step 2: Create the insertartist.php file Create the insertartist.php file that takes the data from…
A: //PHP Code <?php $host = "localhost";$user = "root";$password = "";$dbname = "music"; // Create…
Q: Consider the following context free grammar in BNF form for simple English sentences: (r1) →…
A: SOLUTION
Q: Which pair of IP addresses that unavailable to be assigned to hosts in the given network? A.…
A: IP addresses 172.16.5.1 and 172.16.5.254 can be assigned to hosts since they both belong to the same…
Q: By hand produce a proof of ((E→F)∧(E→G)) → (E→(F∧G)) How many lines does the most natural box proof…
A: The most natural box proof for this statement contains 9 lines. Explanation: The most natural box…
21 python
Step by step
Solved in 3 steps
- Please, I want to modify the code so that the user can add the employee's name, number and specialization, and use for loob He must add more than one employee. When he finishes adding the employee’s data, he asks the user: Do you want 1-Print the data 2-Add a new employee 3-Exit class Doctor:"""Represents a Doctor""" #initializer with specialization default to "general"def __init__(self, Id, name, specialization="general"):#attributesself.Id = Idself.name = nameself.specialization = specialization.lower() #initializing salary to 25000, basic salaryself.salary = 25000 #incrementing salary based on specialization#if specialization is pediatric, increasing salary by 10%if specialization == "pediatric":self.salary += self.salary*10/100 #if specialization is dental, increasing salary by 15%elif specialization == "dental":self.salary += self.salary*15/100 #str() functiondef __str__(self):return (f"Id: {self.Id} \n"f"Name: {self.name} \n"f"Specialization: {self.specialization} \n"f"Salary:…Need Q. sap in JAVA 1. Create a class named Contact with the following attributes : First name, Middle name, Last name, Date of birth, Gender, Anniversary, Address, Area, City, Pincods, State, Country, Telephone number, Mobile number, Email, Website. (Contact.java) 2. Write a method named validate (] in the Contact class created earlier. This method must generate an exception if any of the following validation rules fail: i First name, last name, date of birth and email are compulsory. i, E-mail must be in the correct format , display correct format. iii. At least one of either telephone or mobile number must be specified 3. Implement stack for Contact objects. Use exception handling to apply the following rules: i, Apop must fail on an uninitialized stack and empty stack ii. A push must fail on an uninitialized stack and stack which is already full iii. A push must fail on a stack if the Contact object’s validation fails.How would I fix this to get it looking like output #2? //Animal.cpp is the main function file of the Animal class//CSIS 112/B16 #include <iostream>using namespace std;//defining Animal classclass Animal {public://Name and age of classstring name;int age;//default contstructorAnimal() {name = "";age = 0;cout << "Invoking Animal 2 argument constructor?" << endl;}//virtual functionvirtual void move() {}//getter and setter functionsstring getName() {return name;}void setName(string n) {name = n;}int getAge() {return age;}void setAge(int a) {age = a;}};//Dog derives Animal publicallyclass Dog : public Animal {public://dogs constructorDog(string n, int a) {name = n;age = a;cout << "Invoking Dog constructor" << endl;}//implementing virtual functionvirtual void move() {cout << "I run" << endl;}};class Rabbit : public Animal {public:Rabbit(string n, int a) {name = n;age = a;cout << "Invoking Rabbit constructor," << endl;}~Rabbit() {cout…
- Which of the following cannot be used as constructors ? a. T[] array = new T[10]; b. T[] arr = (T[]) new Object[5]; c. T reference = (T) new Object(); d. T reference = new T();in python how do you (1) Build the ItemToPurchase class with the following specifications: Attributes item_name (string) item_price (float) item_quantity (int) Default constructor (1 pt) Initializes item's name = "none", item's price = 0, item's quantity = 0 Method print_item_cost() Ex. of print_item_cost() output: Bottled Water 10 @ $1 = $10 (2) In the main section of your code, prompt the user for two items and create two objects of the ItemToPurchase class. Ex: Item 1 Enter the item name: Chocolate Chips Enter the item price: 3 Enter the item quantity: 1 Item 2 Enter the item name: Bottled Water Enter the item price: 1 Enter the item quantity: 10 (3) Add the costs of the two items together and output the total cost. Ex: TOTAL COST Chocolate Chips 1 @ $3 = $3 Bottled Water 10 @ $1 = $10 Total: $13Which of the following statements about Python is true? A. Python does not support inheritance. B. Python does not support private attributes. C. Python does not support garbage collection. D. Python does not support function overloading. Which of the follow statements calls the constuctor method for the Rectangle class? A. myRectangle = constructor(self).Rectangle B. myRectangle = Rectangle() C. myRectangle = Rectangle().constructor(self) D. constructor(self) = Rectangle() Which of the following statements about Python is true? A. Python does not support inheritance. B. Python does not support operator overloading. C. Python supports garbage collection. D. Python does not support function overloading.
- USE THE PROGRAM CODE BELOW TO CODE 1. COMMAND LINE ARGS CODE IN JAVA 1. Command Line Args Modify problem # 1 from Lab 8 to accept the values for the key as command line arguments. Your program may assume the arguments given at the command line are integers. If there are no arguments, print a message. If there is at least one argument, compute and print the average of the arguments. Note that you will need to use the parseInt method of the Integer class to extract integer values from the strings that are passed in. If any non-integer values are passed in, your program will produce an error, which is unavoidable at this point. Test your program in NetBeans using the data for problem # 1 Lab 8 as command line arguments. import java.util.Scanner;import java.text.NumberFormat; public class Quizzes{ //---------------------------------------------- // Read in the number of questions followed by // the key, then read in each student's answers // and calculate the number…Please use java only. In this assignment, you will implement a simple game in a class called SimpleGame. This game has 2 options for the user playing. Based on user input, the user can choose to either convert time, from seconds to hours, minutes, and seconds, or calculate the sum of all digits in an integer. At the beginning of the game, the user will be prompted to input either 1 or 2, to indicate which option of the game they want to play. 1 will indicate converting time, and 2 will indicate calculating the sum of digits in an integer. For converting time, the user will be prompted to input a number of seconds (as an int) and the program will call a method that will convert the seconds to time, in the format hours:minutes:seconds, and print the result. For example, if the user enters 6734, the program will print the time, 1:52:14. As another example, if the user enters 10,000, the program should print 2:46:39. For calculating the sum of digits in an integer, the user will be…Which of the following statements about Python is true? A. Python does not support inheritance. B. Python does not support operator overloading. C. Python does not support garbage collection. D. Python supports function overloading. Another name for an attribute of an object is: A. method B. class C. integer D. instance variable Which of the following statements creates an object of the Rectangle class? A. myRectangle = createObject(Rectangle) B. myRectangle = createObject(Rectangle()) C. myRectangle = Rectangle() D. constructor(self) = Rectangle()
- java programming: pleas see attachment as well***** In this task, you are asked to write a program called Swap.java, including at least 3 following methods: - Main() swapDigitPairs ( parameter) - swapLetterPairs (parameter) In the main method, - Use your Panther Number as the input argument, call swapDigitPairs ( parameter) - Ask user to input a number and call a method swapDigitPairs to swap the number as shown in the example of the following figure. - Ask the user to input a string of letters/numbers and call a method swapLetterPairs to swap the letters as shown in the following example. - swapDigitPairs ( parameter) - swapLetterPairs (parameter) In the main method, - Use your Panther Number as the input argument, call swapDigitPairs ( parameter) - Ask user to input a number and call a method swapDigitPairs to swap the number as shown in the example of the following figure. - Ask the user to input a string of letters/numbers and call a method swapLetterPairs to swap the letters…Question: 3Implement the design of the Student_Tutor class that inherit from Student class so that the following code generates the output below:Hint: Each room has a capacity of 2 Student tutors.class Student: def __init__(self,name,student_id): self.name = name self.student_id = student_id self.semester = "Spring 2022" def details(self): print("Name:",self.name) print("Student_ID:",self.student_id) print("Current Semester:",self.semester)# Write your code here:STs = []S1 = Student("Reem", 18101235)S1.details()print("1.======================================")ST1 = Student_Tutor("Moynul", 16107892, 35, "CSE110", "CSE111")ST2 = Student_Tutor("Priyo", 16107792, 25,"CSE320")ST3 = Student_Tutor("Ronok", 18207892, 36, "CSE110", "CSE111", "CSE221", "CSE220")ST4 = Student_Tutor("Zeba", 19307892, 48, "CSE110")STs.extend([ST1, ST2, ST3, ST4])print("2.======================================")for i in range(len(STs)): STs[i].details()…Hello.. i hope you are well. please code this for me in java and follow the instructions mentioned as it is Write code that uses lambdas and streams to satisfy the requirements listed below. Print a list of all employees that earn $50,000 or more:Print a list of the names (not the Employee instances) of all employees who were hired on or after Jan. 1, 2012.Print the maximum salary of all employees.Print the minimum salary of all employeesNow, print the average salary of all Female and Male employees:Finally, use the reduce() operation to find the Employee instance of the employee with the highest salary: