5. You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birth month? // calculate birth month based on the day of the month, day of the week, and the birth year // dayMonth {number} - a day of a month from 1 to 31 // dayWeek {string} - the name of the day of the week // year {number} - the birth year // return {string} - the month you were born BirthdayLibrary.birthMonth(dayMonth, dayWeek, year); A. 1 В. 4 С. О
Q: Write a program that reads students’ names followed by their test scores. The program should output…
A:
Q: Part-1: Admin In admin part, admin can add medicines serially wherever he wants! (Medicine Name,…
A: Note: We are authorized to answer one problem/part at a time since you have not mentioned which one…
Q: Write an application that accepts a word from a user and converts it to Pig Latin. If a word starts…
A: The ask is to take a single word input and convert into the PigLatin word. To convert into PigLatin,…
Q: Write an application that accepts a word from a user and converts it to Pig Latin. If a word starts…
A: The, code has given below:
Q: You can declare "local" variables in Racket via the use of the let function. For example, try the…
A: (define a 2);;binding a variable to a value (define b 3) (define c 4) (define (strange x) (let…
Q: please code in python Write a function called weighted_avg that takes a list of grades and a…
A: raise allows you to throw an exception at any time.
Q: You have imported a library with the birthMonth() function. Based on the API, how many strings are…
A: Based on the API, there are only one strings as input to calculate the birth month.
Q: Returns currentGuess with BLANK replaced by letterGuessed everywhere letterGuessed appears in…
A: We create a array of character and put in the letterGuessed in it at places where it comes in…
Q: What is the output of the unit testing? #include using namespace std; class TempConvert {…
A: Ans: the output of the unit testing is: #include <iostream>using namespace std; class…
Q: In this assignment, you will implement a simple class called CustomString. This class represents a…
A: The class and its methods are defined one after another as below: 1. getString: public String…
Q: Write a code in JAVA for the following. A university is going to conduct the placements for the…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: In this version, you are to reimplement the functionality of version 1, but this time using the…
A: package javacode; class Name { //For storing last name and first name. private String…
Q: ar wordA[20] = "SPRING HAS"; ar wordB [20] = "SPRUNG"; ar wordC[20]; t n1, n2; a. What is the value…
A: A) in the characters array index starts from 0 so the value of wordA[4] gives the value in the 5 th…
Q: Can you add class level comments, function level comments and inline comments In this line int…
A: In this line int I,n=0,s=0; they say the assigned value is not used can you fix that? I guess you…
Q: CAN YOU FIX MY CODE???
A: It is showing around 20 errors and the code is showing some errors at some lines. But our error is…
Q: Write a Java function that computes the square root of a double number using the Newton-Raphson…
A: Algorithm Assign X as N. initiate a loop and calculate the root which will move towards the…
Q: eger using Integer.parseInt. In case of an exception (when converting the string to an integer), the…
A: Code: import java.util.Scanner;class Main{public static void main(String args[]){Scanner sc = new…
Q: Develop a crawler that collects the email addresses in the visited web pages. You can write a…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Given 4 numbers (passed in as parameters) write a function that returns the average of these numbers…
A: using html var table = document.getElementById("myTable"); var rows = table.rows; for (var i = 0; i…
Q: Run this code. What happens code: # Importing the required libraries import tkinter as T def…
A: Required: Run the given code and provide output. Given: # Importing the required librariesimport…
Q: 2. Replace (????) with relevant code for the program to function. Details about the programs are…
A: package finalexamtakehome2; import java.util.*; // for Arrays class /** * * @author sweetkim */…
Q: Please use java. In this assignment, you will implement a simple class called CustomString. This…
A: Java Program used to answer this question
Q: Q- I want someone to convert this code to java code ASAP #include using namespace std; class…
A: Find the required code in java as below and output:
Q: In Python, Create a CourseGrades application that simulates a grade book for a class with 12…
A: The answer is given below:-
Q: 1. Replace the (????) with relevant code to make th eprogram function. Details about the code are…
A: hasNextLine() is used to check whether there is next line or not whereas hasNext() is used to check…
Q: Python Code: Write a function that takes a single number as an argument: 1) This function…
A: Python: Parameters and arguments are simply the various terms used for the variables/values you're…
Q: Write a program that reads students’ names followed by their test scores. The program should output…
A: Required: Write a program that reads students’ names followed by their test scores. The program…
Q: Write a program that uses an exception class called StringTooLongException, designed to be thrown…
A: Required: Write a program that uses an exception class called StringTooLongException, designed…
Q: Write a program in C++ that lets the user enter some English text, then converts the text to…
A: Given : Write a program in C++ that lets the user enter some English text, then converts the text to…
Q: The problem I have is, say I am storing the phone number and don't want their phone number to…
A: import java.util.Scanner; class Clint { private String id; private String name;…
Q: ou are said to store data of Hospitals in a city. For that purpose, you are asked to develop a…
A: You are said to store data of Hospitals in a city. For that purpose, you are asked to develop a…
Q: How can I create a validation in java? for example: I want that the only possible entries be: a, b…
A: Program plan: For validating the input value using the scanner class in java. The only possible…
Q: I have code writtwn but cannot get the right out put code: package…
A: Given: I have code writtwn but cannot get the right out put
Q: /java Part I: Code an application using the BigDecimalclass to calculate the return of an…
A: import java.util.Scanner; public class FutureValueApplication public static void main(String…
Q: Please write the Java program for the given scenario Create a CourseException class that extends…
A: Answer : /* please find the required solution */ public class course { string…
Q: Write a javascript function that would allow you to do this: var run = exercise('running');…
A: Using functions Print the details Call that functions Print
Q: AddressBook Exception Create an AddressBookException class that you can use to throw exceptions in…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: I need to make an ATM program that allows the user to check his or her balance after entering his or…
A: Python Code: import randomimport sys class ATM(): def __init__(self, name, account_number,…
Q: Write a Python function named add_vegetable that is passed a (possible empty) set of vegetable…
A: ANSWER: 1. Start 2. define function add_vegetable() 3. if names in name 4. then raise ValueError 5.…
Q: This is a part of my code where it converts a binary to a decimal. The constructor should take a…
A: Java code import java.util.Scanner;public class Binary { int[] bin; //defining an integer…
Q: You have imported a library with the birthMonth() function. Based on the API, how many strings are…
A: Here we calculate birth month based on the day of the month, day of the week, and the birth…
Q: 1. When does the + operator concatenate instead of add? What happens if you try to use + on a string…
A: Let us see the details below.
Q: REUPLOAD: I need to fill the program to its designated output I have inserted sample runs and the…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: How do I fix the error Java? Error ---------- Movie.toString() returns: Movie: [ Minutes 142 |…
A: toString method: public String toString() { //"movie".replaceAll("(?!^)([A-Z])", " $1"); String…
Q: Write a program that reads students’ names followed by their test scores. The program should output…
A: The program will take input number to take that amount of student’s information. Then we have…
Q: #include #include #include #include #include #include "card.h" #include "deck.h" #include…
A: Programming is a way to instruct the computer devices to operate. Every computer needs a set of…
Q: Write a client program for MyTime which loops around getting strings from the user representing…
A: In the above question, we are provided with the information that will help us to solve the problem.…
Q: Suppose you have Java source files under the directorieschapter1, chapter2, . . . , chapter34. Write…
A: Programming approach Importing the required packages in the program. Obtain the file path as…
Q: Suppose you have Java source files under the directorieschapter1, chapter2, . . . , chapter34. Write…
A: import java.io.File;import java.io.FileNotFoundException;import java.io.PrintWriter;import…
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- IN JS PROGRAMMING LANGUAGE Your local bank has decided to upgrade its ATM machines by incorporating motion sensor technology. The machines now interpret a series of consecutive dance moves in place of a PIN number. Create a program that converts a customer's PIN number to its dance equivalent. There is one dance move per digit in the PIN number. A list of dance moves is given in the code. Examples danceConvert("0000") danceConvert("3856") ["Shimmy", "Shake", "Pirouette", "Slide"] → ["Slide", "Arabesque", "Pop", "Arabesque" ] -Counting hashtags Write Python code to count the frequency of hashtags in a twitter feed. Your code assumes a twitter feed variable tweets exists, which is a list of strings containing tweets. Each element of this list is a single tweet, stored as a string. For example, tweets may look like: tweets = ["Happy #IlliniFriday!", "It is a pretty campus, isn't it, #illini?", "Diving into the last weekend of winter break like... #ILLINI #JoinTheFight", "Are you wearing your Orange and Blue today, #Illini Nation?"] Your code should produce a sorted list of tuples stored in hashtag_counts, where each tuple looks like (hashtag, count), hashtag is a string and count is an integer. The list should be sorted by count in descending order, and if there are hashtags with identical counts, these should be sorted alphabetically, in ascending order, by hashtag. From the above example, our unsorted hashtag_counts might look like: [('#illini', 2), ('#jointhefight', 1),…IN JAVA Create a function that takes a string and returns the number of alphanumeric characters that occur more than once. Examples duplicateCount ("abcde") → 0 duplicateCount ("aabbcde") → 2 duplicateCount ("Indivisibilities") → 2 duplicateCount ("Aa") → 0 // Case sensitive
- .Write code for below problem. The input below is just an example and you should implement independent from the input. Please paste the link to the answer shared using pastebin, dotnetfiddle, jsfiddle, or any other similar web-site. You will have an orthogonal triangle input from a file and you need to find the maximum sum of the numbers according to given rules below; 1. You will start from the top and move downwards to an adjacent number as in below. 2. You are only allowed to walk downwards and diagonally. 3. You can only walk over NON PRIME NUMBERS. 4. You have to reach at the end of the pyramid as much as possible. 5. You have to treat your input as pyramid. According to above rules the maximum sum of the numbers from top to bottom in below example is 24. *1 *8 4 2 *69 85*9 3 As you can see this has several paths that fits the rule of NOT PRIME NUMBERS; 1>8>6>9, 1>4>6>9, 1>4>9>9 1 + 8 + 6 + 9 = 24. As you see 1, 8, 6, 9 are all NOT PRIME NUMBERS and walking over these yields the…a. The mean of a list of numbers is its arithmetic average. The median of a list is its middle value when the values are placed in order. For example, if a list contains 1, 4, 7, 8, and 10, then the mean is 6 and the median is 7. Write an application that allows you to enter five integers and displays the values, their mean, and their median. Save the files as MeanMedian.java. b. Revise the MeanMedian class so that the user can enter any number of values up to 20. If the list has an even number of values, the median is the numeric average of the values in the two middle positions. Save the file as MeanMedian2.java.In C++. Data canvas is a file with bunch of random words. Data canvas: aahs aals abas abba abbe abed abet able ably abos abri abut abye abysaced aces ache achy acid acme acne acre acta acts acyl adds adit adosadze aeon aero aery afar agar agas aged agee ager ages agha agin agioagly agma agog agon ague ahed ahem ahis ahoy aide aids ails aims ainsairn airs airt airy aits ajar ajee akee akin alae alan alar alas albaalbs alec alee alef ales alfa alga alif alit alky alls ally alma almealms aloe alow alps also alto alts alum amah amas ambo amen amia amidamie amin amir amis ammo amok amps amus amyl anal anas ands anes anew anga anil anis ankh anna anoa anon ansa anta ante anti ants anus aped aper apes apex apod apos apps apse aqua arak arbs arch arco arcs areaares arfs aria arid aril arks arms army arse arts arty arum arvo arylasci asea ashy asks asps atap ates atma atom atop auks auld aunt auraauto aver aves avid avos avow away awed awee awes awls awns awny awolawry axal axed axel…
- *CODE SHOULD BE IN JAVA* A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries. Use the following names and phone numbers: Name Phone # Gina (847) 341-0912 Marcia (847) 341-2392 Rita (847) 354-0654 Jennifer (414) 234-0912 Fred (414) 435-6567 Neil (608) 123-0904 Judy (608) 435-0434 Arlene (608) 123-0312 LaWanda (920) 787-9813 Deepak (930) 412-0991Java 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.In Java C++Write a code assessing a txt file consisting of id numbers. It should asses the given id numbers if its valid. An ID number can be considered valid given below. The following numbers are (imagine that the numbers are in a txt file)12034562120238471204562312067282120371891293042812047281129374911283920112013818It must be divisible by 11 given the formula below.The output will be the number of valid and invalid numbers. 11191031 = 1*8 + 1*7 + 1*6 + 9*5 + 1*4 + 0*3 + 3*2 + 1*1 = 77sum of the products must be divisible by 11 for it to be valid.
- Task 2 Get Binary 1: Implement the get_bin_1 function as directed in the comment above the function. If the directions are unclear, run the code, and look at the expected answer for a few inputs. In order to be able to compare your solution to the answer, you cannot simply print out the binary directly to the console. Instead, you have been provided with a very rudimentary stringbuilder implementation that allows you to build a string one character at a time, without the ability to erase. There are comments at the top of the code explaining how to use the stringbuilder, however you could also see how it is being used in task_2_check. Note: if you create a stringbuilder and append ‘a’, ‘b’, then ‘c’, the resulting string will be “abc” when printed. You are free to read through the stringbuilder implementation, but it is quite complicated in order to make it easy to use. As specified in the comment, you may not use division (/) or mod (%) to implement this function (as the check…Q.Create an interesting educational information chat box that asks the user to give an input question and then answers the question given by user with a suitable answer. It should match the question of user with the answer avaliable. Make use of list for different questions and answers. (if possible) Save two to three answers for a single question and then for random selection of elements from those answers use random choice(list) method from random module that returns a random element. Also for a user question that doesn't matches with the questions present in the chat box it should display statement like "oops i can't answer that" "sorry i am not intelligent enough" "could u please ask something else" using random method so that every time one of these statements appear **coding language python ***try using basic programming techniques in python without using arrays and pointers * * * copy paste the program itself and also the screenshot of program and output * * * use any…C++: Create a basic contact book where you can store and then retrieve contact information.The information that (at least) should be able to be stored is name (postal) address e-mail address telephone number Birthday, other. It should work as follows. The user should be able to choose what he wants to do, for example : add contact or find the phone number of a given contact. There are several ways to implement this, for example: • To have a menu where the user can choose by entering a number corresponding to one of the menu options. Exit should be one of the options. • where the user gives commands for what to do. The functionality that must exist is • to add a contact, • to delete a contact, • to search for a contact. The contact book should be saved in a file so that it does not disappear between runs of the program.