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
- Java OOP Write a complete address book maintenance application. The user of the program has four options: Add a new person, delete a person, modify the data of a person, and search for a person by giving the name. Use the AddressBook class, either the original one from the chapter or the modified one from the previous exercises. You have to decide how to allow the user to enter the values for a new person, display person information, and so forth.The following is the specification for the constructor of a EmailFolder class: /*** Creates a new EmailFolder with the given label** @precondition label != null AND !label.isEmpty()* @postcondition getLabel()==label*/public EmailFolder(String label) Assume the variable folders is an array list of EmailFolder objects. Write code that gets the tenth item in the list, assigning it to an appropriate variable. (java)python: def typehelper(poke_name): """ Question 5 - API Now that you've acquired a new helper, you want to take care of them! Use the provided API to find the type(s) of the Pokemon whose name is given. Then, for each type of the Pokemon, map the name of the type to a list of all types that do double damage to that type. Note: Each type should be considered individually. Base URL: https://pokeapi.co/ Endpoint: api/v2/pokemon/{poke_name} You will also need to use a link provided in the API response. Args: Pokemon name (str) Returns: Dictionary of types Hint: You will have to run requests.get() multiple times! >>> typehelper("bulbasaur") {'grass': ['flying', 'poison', 'bug', 'fire', 'ice'], 'poison': ['ground', 'psychic']} >>> typehelper("corviknight") {'flying': ['rock', 'electric', 'ice'], 'steel': ['fighting', 'ground', 'fire']} """ # pprint(typehelper("bulbasaur"))#…
- --------------Answer question below:-------------- In Java: Given a Student class, create a class with following characteristics: The class name should be ClassRoom. Private variable students array to maintain the list of Student objects. Function addStudent with input parameter name (string) and rollNo(int) adds a new student in “students” list. Method getAllStudents should return all the students in ClassRoom. Input Jack 1 Jones 2 Marry 3 where, First & Second line represent a student’s name and roll number. And so on. Output 1 - Jack 2 - Jones 3 - Marry Assume that, Maximum “students” count can be 10. DriverMain.java and Solution.java attached.CHALLENGE ACTIVITY 4.9.2: Boolean operators: Detect specific values. Write an expression using membership operators that prints "Special number" if special_num is one of the special numbers stored in the list special_list = [-99, 0, 44].Sample output with input: 17 Not special number Use Python please.Java RMI modify “MyClient.java”, “Method.java” and “MethodRemote.java” After your modification, re-compile, and run server and client programs, the client asks the user to enter a string. • If a string “time” is entered, the client will get current date and time from server by remotely invocating the method “action()” in server machine. • If another string other than “time” is entered, then the client will get the capitalized version of the string the user just entered by remotely invocating the method “action()” in server machine. • Your client program should keep asking the user’s input for a string unless an empty string is entered (i.e., just press ENTER key without anything else). When an empty string is entered, this client will quit. while a client is being connected to the server, the server should be able to receive new clients’ connections for current date/time or capitalized strings. In other words, the server should concurrently handle multiple clients’ connections and…
- PLZ help with the following: True/False In java it is possible to throw an exception, catch it, then re-throw that same exception if it is desired GUIs are windowing interfaces that handle user input and output. An interface can contain defined constants as well as method headings or instead of method headings. When a recursive call is encountered, computation is temporarily suspended; all of the information needed to continue the computation is saved and the recursive call is evaluated. Can you have a static method in a nonstatic inner class?package filterSort;import java.io.File;import java.io.FileNotFoundException;import java.util.Arrays;import java.util.Scanner;import java.util.*; public class FilterSort { /*** Allocates and returns an integer array twice the size of the one* supplied as a parameter. The first half of the new array will* be a copy of the supplied array and the second half of the new* array will be zeros.** @param arr the array to be copied* @return array twice the size of <tt>arr</tt> with its initial* elements copied from <tt>arr</tt>* @throws NullPointerException if <tt>arr</tt> is null.*/public static int[] doubleArrayAndCopy(int[] arr) {int len = arr.length;int max = arr.length * 2;int[] copyArr = Arrays.copyOf(arr,max);int length = copyArr.length-1;Arrays.sort(copyArr, 0, length);return copyArr; } public static void main(String[] args) {int[] data = new int[8];try {File file = new File("data.txt");Scanner myReader = new Scanner(file);for(int i = 0;…CHALLENGE ACTIVITY 2.9.2: Math functions. 487180.3542414.qx3zqy7 Jump to level 1 Write the code that computes: z = |x + y| Note: Use dot notation to access an object in the math module. Ex: The constant pi is accessed via math.pi. 1 import math 2 3 x = float(input()) 4 y float (input()) 5 Your code goes here *** 6¹ 7 8 print(f'{z:.2f}')# This will output only 2 decimal places. 9 Feed
- Basic Java Help Each year, the Social Security Administration provides a list of baby names for boy and girls by state. You will write a program to read a file containing a list of baby names and display the top names. To start, implement the following class: baby names util = printTopNames(File, int): void printTopNames Will be a static method. It will accept two parameters, one is a File containing the list of names. The other is an integer that indicates how many names to display (ie, top 10 names, or top 50 names, etc). The integer argument could be any valid integer. You do not have to worry about an integer value large than 5 for the boy/girl names. This method should open the file and parse the file and print the names as shown below: Your program will use the Scanner class to read the data from the file (see your text for examples). You will also need to use a delimiter with the scanner so that the scanner will break the line apart based on the commas. For this file, set…X1155: Throwing an Exception The method below takes in a String parameter representing a username. It should throw an Exception if the username is less than 3 characters long. The method correctly throws the exception, but something is still missing. Fix the problem. Your Answer: Feedback 1 public String validateUser (String userName) 2|{ 3 45 6 7 8|} 9 if (userName.length() < 3) { throw new Exception("userName is too short"); } return userName; Check my answer! Reset Your feedback will appear here when you check your answer.Multiple choice in java Given the following code snippet: ArrayList<Shape> shapes = new ArrayList<>(); Scanner scan1=new Scanner(new File("D:\\AAUJ\\AAA\\radiusInfo.txt")); //This statement is equivalent to Scanner scan1=new Scanner(new FileInputStream("D:\\AAUJ\\AAA\\radiusInfo.txt")); while(scan.hasNext()) { double radius; scan.next(); radius=Double.parseDouble(scan.next()); shapes.add(new Circle(radius)); } Select one: a. The compiler will report an error if Shape class does not extend Circle class b. The compiler will report an error c. The compiler will report an error if Circle class does not extend Shape class d. None of these