def show (a, b=6, c=4): print ('{}/{}/{}'.format (b, a, c)) show (b=7, a=2) show (c=1, a=9)
Q: Morse code is a code where each letter of the English alphabet, each digit, and various punctuation…
A: Morse code is a method used in telecommunication to encode text characters as standardized sequences…
Q: Module main() // Local variables Constant Integer SIZE = 12 Declare String month[SIZE] =…
A: Given: Module main() // Local variables Constant Integer SIZE = 12 Declare String month[SIZE] =…
Q: 5. (Longest common prefix) Write a method that returns the longest common prefix of two strings. For…
A: FUNCTION: def prefix(str1, str2): n1 = len(str1) n2 = len(str2) result = ""…
Q: Subject - Data Structure Please help me to debug my error. Thank you in advance! import…
A: I give the required error-free code along with output and code screenshot
Q: Java Program (Display the prime factors) Write a program that prompts the user to enter a positive…
A: In the java program, the necessary libraries are included for the Math and Scanner classes. Create a…
Q: Module main() // Local variables Constant Integer SIZE = 7 Declare Integer index, numbers[SIZE]…
A: Flowcharts were first used to record business operations in the 1920s and 1930s. The Flow Process…
Q: Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so the…
A: Program: // Import the required packagesimport java.util.Scanner;import java.lang.String;// Class…
Q: Python Turtle Graphics Draw a spiral diagram using Python turtle package program follows 3 steps:…
A: Given: Python Turtle Graphics Draw a spiral diagram using Python turtle package program follows 3…
Q: public Account(String name) - Constructor: create an account with the given name and initial balance…
A: In Java, classes are collections of variables and functions that operate on those variables. The…
Q: partNames is a String array containing 100 elements. Write a for loop (standard for loop, not…
A: Here I am taking only ten elements you can add more elements in array and it print the result in the…
Q: Obviously that the program has many syntax errors. Rewrite the entire program after correcting…
A: A class is a user-defined data type that combines data members and methods for manipulating that…
Q: expression? word = 'object oriented' print word[0] print word[7] print word[5] print word[-1] o, 0,…
A: String: In python, strings are used to store the array of characters. There is no datatype named…
Q: Write a program that reads five cards from the user, then analyzes the cards and prints out the…
A: As no programming language is mention. So i am using c++.
Q: Design an application that accepts 10 numbers and displays them in descending order.
A: Given: Design an application that accepts 10 numbers and displays them in descending order.…
Q: CENGAGE MINDTAP Programming Exercise 8-3A Instructions CarCareChoice.java + Write an application for…
A: Step-1: Start Step-2: Print the list of available services Step-3: Take input form user corresponds…
Q: Using Javascript and HTML: An interesting application of computers is drawing graphs and bar charts…
A: <html><head><title>Drawing Graph and Bar Chart</title><script>var…
Q: Private Sub btnDisplay_Click(...) Handles btnDisplay.click Dim word As String InputBox ( "What is…
A: Private Sub btnDisplay_click(...) Handles btnDisplay.click Dim word As String word = InputBox ("What…
Q: **3.23 (Geometry: point in a rectangle?) Write a program that prompts the user to enter a point (x,…
A: C++ Program for above : #include <iostream> using namespace std; int main() { int…
Q: 9. Chess Board Write a program that draws an 8 X 8 chess board, with alternating gray and white…
A: As per guidelines we can answer only one question for answer of other question please ask separately
Q: This program assigns values to two variables // and performs mathematical operations with them
A: Errors 1. System.out.println("adding " + x + y); The above statement concatenates the value of x and…
Q: NEED HELP WITH JAVA PROGRAM ERROR PLEASE HELP THANK YOU CODE: class quad{ public static void…
A: Exception is an event which occurs during the execution of the program which will affect…
Q: String objects are immutable. This means they, a. cannot be changed b. must be initialized c. None…
A: Explanation: Immutable means which cannot be changed. In Java, string objects are immutable then…
Q: .35 (Sides of a Triangle) Write an application that reads three nonzero values entered by the user…
A: #include <iostream>using namespace std; int main(){ double a, b, c;…
Q: Beautiful Strings Programming challenge description: When John was a little kid he didn't have much…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: getRandomLib.h: // This library provides a few helpful functions to return random values// *…
A: Program Instructions:Include the necessary header files.Print hello message and as for a…
Q: 5. Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so…
A: Python program code: a=input("Enter a telephone number XXX-XXX-XXXX: ") #user inputb=a.split('-')…
Q: This method returns a string with a number of vertical bars that correspond to the bars parameter.…
A: GIVEN: Create a method that returns a string with a number of vertical bars that correspond to the…
Q: string ToUpper(const string& phrase){ string retVal phrase; for (size_t i = 1; i < phrase.length();…
A: Please find the answer below :
Q: Automatic lyncs generator: write a program that asks the user to enter a number between 6 and 11,…
A: import io import os import sys import string import numpy as np import pandas as pd from tensorflow…
Q: struct Plate { var size : Int func changeSize (newSize: Int) { size = newSize func printContents ()…
A: A structure is a user-defined data type that can be used to group items of possibly different types.…
Q: Strictly java code Write an application for Limpopo’s Car Care Shop that shows a user a list of…
A: Use an if-elseif ladder to compare the user input and then display message accordingly The program…
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Required:
Q: Geometric Progression Printer As you might recall, a Geometric Progression (or GP) is a sequence of…
A: Step-1: Start Step-2: Declare variable a1 and take input from user Step-3: Declare variable r and…
Q: def display (): print ("ITSE101") def displayNumber (n1, n2): if nl > n2: return nl + n2 else:…
A: I have provided the comments to the given code and output.
Q: Write Java statements that finds the number of the white-space characters in str.
A: Algorithm: Given string: str 1. Initialize noOfWhiteSpaces to 0 to count number of white space…
Q: The mean of a list of numbers is its arithmetic average. The median of a list is its middle value…
A: Start enter 9 number by defining median `calculate median calculate mean and print it
Q: House +numberRoom:int +type:String. +DisplayInfo();
A: For the above class diagram, we have two class one is Bungalow and other is House class.
Q: (Game: pick four cards) Write a program which creates a deck of cards of 52 and pick any four cards…
A: As Language is not defined I'm doing it in Java Language
Q: Stairviewer public static void main(String (] args) // Step 2: Create a rectangle and draw it as the…
A: ANSWER: Draw Rectangle in C graphics: Draw rectangle for utilized Rectangle(). Directions of left…
Q: This is a program in C language. Help me debug this program. it has 3 errors. Please upload a…
A: Given program is a C++ program, not C program. Because iosteam, cout, cin all these are used in C++.…
Q: return midpt; else if (arr[midpt] < value) return else return find(arr,value, left, midpt-1); } void…
A: Given:
Q: Write a Java program that will display the given menu: NOTE: adding a string must accept a…
A: import java.util.*; public class Tester{ public static void main(String[] args) {…
Q: Programming challenge description: When John was a little kid he didn't have much to do. There was…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: SHAPE String name abstract double getArea() override equals and toString encapsulate the fields
A: We need to define the classes Shape,Rectangle,Circle and Square as per the given description.
Q: Program4 - (from ch7) - Computer-Assisted Instruction (Project Name: AITeacher) - The use of…
A: Actually, given information: The use of computers in education is referred to as computer-assisted…
Q: section grouping is a string containing just characters "(" and ")". A standard section succession…
A: Here have to determine about problem statement of Regular Bracket Sequences code
Q: The mean of a list of numbers is its arithmetic average. The median of a list is its middle value…
A: In the above code, it has been asked to print the mean and median of the 9 numbers, in the following…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Suppose you have Java source files under the directorieschapter1, chapter2, . . . , chapter34. Write a program to remove the statement package chapteri; in the first line for each Java source file underthe directory chapteri. Suppose chapter1, chapter2,. . . , chapter34are under the root directory srcRootDirectory.The root directoryandchapteridirectory may contain other folders and files. Use the followingcommand to run the program:java Exercise12_20 srcRootDirectoryCan you add class level comments, function level comments and inline comments In this line int i,n=0,s=0; they say the assigned value is not used can you fix that package avgsum;import java.util.Scanner; /**** @author Zaahid*/public class AvgSum { /*** @param args the command line arguments*/public static void main(String[] args) { int i,n=0,s=0;double average;{System.out.println("Enter the 5 numbers : "); }for (i=0;i<5;i++){Scanner in = new Scanner(System.in);n = in.nextInt();s +=n;}average=s/5;System.out.println("The sum of 5 numbers is : " +s+"\nThe Average is : " +average);}NEED CODE IN ASSEMBLY LANGUAGE AND CODE MUST BE MASM615 COMPATIBLE AND PLEASE RUN PROGRAM ON DOSBOX , THANK YOU Write an assembly language procedure named “equalsIgnoreCase”, which receives two strings and their sizes,and returns true if the two strings contain the same characters irrespective of the case. For example, for strings{“aBc”} and {“Abc”} the function returns true, but for {“aBc”} and {“aB”}, or {“aBc”} and {“Xbz”}, thefunction returns false. Write a generic procedure that must handle all checks and conditions.
- 1. Build a web crawler function that starts with a URL representing a topic (a sport, your favorite film, a celebrity, a political issue, etc.) and outputs a list of at least 15 relevant URLs. The URLs can be pages within the original domain but should have a few outside the original domain.47. What statement of the following is the most appropriate? Group of answer choices The node class defined in the textbook can be implemented as a template class, providing more limitation to implement other container classes. The node class defined in the textbook can be implemented as a template class, providing more memory leak possibility to implement other container classes. The node class defined in the textbook can be implemented as a template class, providing more flexibility to implement other container classes. The node class defined in the textbook can be implemented as a template class, providing more tool box to implement other container classes. The node class defined in the textbook can not be implemented as a template class.Find all the indexes whose labels equal 2 using np.where and the label array y. The output should be saved in two class idx.Reminder: Remember to index np.where() at zero # TODO two_class_idx = np.where(y == 2 )[0] print(f"two_class_idx output: \n {two_class_idx}") try: print(f"two_class_idx shape: {two_class_idx.shape}") except Exception: pass ([ (isinstance(two_class_idx, np.ndarray),f'two_class_idx is not an NumPy array! two_class_idx is currently a {type(two_class_idx)}'), (np.all(two_class_idx == np.array([3,9,11,12,16])),'two_class_idx does not contain the correct location values') ])
- TODO 1 Obtain all the indexes with labels equal 2 with np.where and the label array y. Keep the results in two_class_idx also index np.where() at 0 # TODO 1.1 two_class_idx = print(f"two_class_idx output: \n {two_class_idx}") try: print(f"two_class_idx shape: {two_class_idx.shape}") except Exception: pass todo_check([ (isinstance(two_class_idx, np.ndarray),f'two_class_idx is not an NumPy array! two_class_idx is currently a {type(two_class_idx)}'), (np.all(two_class_idx == np.array([3,9,11,12,16])),'two_class_idx does not contain the correct location values') ])I. Output of public class Test implements Runnable { public void run() { System.out.println( "running!" ); } public void start( int i ) { } public static void main( String[] args ) { Test t = new Test(); Thread th = new Thread( t ); t.start( 1 ); } } II. Output of public static void main(String[] args) { int[] arr = { 0, 1, 2, 3, 4 }; System.out.println( arr[arr[arr.length-1]] ); } III. System.out.println (“3 in binary Nos=” + “Integer.toBinaryString(3)”); IV. Will the following java code compile? if not why? if yes write the output. abstract class A { abstract void callme(); // concrete methods are still allowed in abstract classes void callmetoo() { System.out.println("This is a concrete method."); } } class B extends A { void callmetoo() { System.out.println("B's implementation of callme."); } } class AbstractDemo { public static void main(String args[]) { B b = new B(); b.callmetoo(); } } } V.…Suppose you have Java source files under the directorieschapter1, chapter2, . . . , chapter34. Write a program to insert thestatement package chapteri; as the first line for each Java source file underthe directory chapteri. Suppose chapter1, chapter2, . . . , chapter34are under the root directory srcRootDirectory. The root directoryandchapteridirectory may contain other folders and files. Use the followingcommand to run the program:java Exercise12_18 srcRootDirectory
- Examine the code and write - What is the content of the first 100 characters of text at the end of the program with output? import java.net.MalformedURLException; import java.net.URL;import java.net.URLConnection;import java.io.IOException;import java.util.Scanner;public class Question1 {@SuppressWarnings({ "resource", "unused" })public static void main(String[] args) throws IOException {URLConnection connection = null;try {connection = new URL("http://sun.com").openConnection();} catch (IOException e) {e.printStackTrace();}String text = new Scanner(connection.getInputStream()).useDelimiter("\\Z").next();}}## I NEED HELP GETTING THIS PYTHON CODE TO FUNCTION PROPERLY## class Patient: def _init_(self,fname,mname,lanme,zipcode,phone,addess,city,state): self.firstName = fname self.middleName = mname self.lastName = lanme self.zip = zipcode self.phoneNumber=phone self.add = addess self.city = city self.state = state def _str_(self): return "Name: " +self.firstName+ " "+ self.middleName +" "+self.lastName+"\n"+"Address: "+self.add+" city: "+self.city class Procedure: def _init_(self, procedure, date, practitioner, charges): self.procedureName = procedure self.procedureDate = date self.practitionerName = practitioner self.charg = charges def _str_(self): x= float(eval(str(self.charg))) return "Procedure Name: "+ self.procedureName+"\nDate: "+ self.procedureDate+"\nPractioner: "+ self.practitionerName+ #Patient Objecct patient1 =…I have code writtwn but cannot get the right out put code: package chapter.pkg6.part.pkg2.assignment;import java.util.Scanner;/** * * @author matty */public class Chapter6Part2Assignment { /** * @param args the command line arguments */ static long cardnumber= 4440967484181607L; public static void main(String[] args) { // asking for card number System.out.println("please enter the card number:/n"); System.out.println(cardnumber + "is" + (validitychk(cardnumber)?"valid":"invlaid")); System.out.println(); } public static boolean validitychk(long cnumber) { //return statemnt return (thesize(cardnumber) >= 13 && thesize(cnumber) <= 16) && (prefixmatch(cardnumber, 4) || prefixmatch(cardnumber, 5) || prefixmatch(cnumber, 37) || prefixmatch(cardnumber, 6)) && ((sumdoubleeven(cnumber) + sumodd(cnumber)) % 10 == 0); } public static int thesize(long cardnumber){ String cardnumberString= cardnumber +"";…