output of the following * ?program
Q: Where are gadgets typically found? A. Anywhere in the code B. At the end of a function…
A: Gadget is an often small electronic device with a practical use.The gadget may be static such as a…
Q: 2. (Count the letters in a string) Write a function that counts the number of letters in a string…
A: In this question we have to count the number of letters in the string so we we use a predefined…
Q: /*12: Create a function named hello that has a $name parameter and outputs "Hello Dave!" when it is…
A: As per the requirement the program has been completed. Algorithm: Step 1: Start Step 2: Declare the…
Q: (Count the letters in a string) Write a function that counts the number of letters in a string using…
A: CODE:- def countLetters(s) : return len(s)string = input("Enter a string : ");print("number of…
Q: Write code to complete DoublePennies()'s base case. Sample output for below program:Number of…
A: Answer:The condition for finding total pennies is as follows:if(numDays == 0){ totalPennies =…
Q: a)Create a string variable and assign to it your favorite color. ɔ) Write Matlab code that prompts…
A: Following is the approach used: First, we would set a variable with the required color name and then…
Q: Instructions: In the code editor, you are provided with a function that checks whether a number is…
A: In main method, initialise a variable 'n'. Take n as a user input. Initialise an array of the size…
Q: Assume the following function has been implemented. def descript(num: int)-> str: """Return "High"…
A: Solution for given question,
Q: Rewrite the following function using a while loop instead of a for loop and without using any break…
A: Given,def blat (nums, value): """Does something weird"" stuff = [] for num in nums:…
Q: C-Program for blood pressure. The program (screenshot below) compares the systolic & diastolic…
A: //BloodPressure.h#ifndef BLOODPRESSURE_H#define BLOODPRESSURE_H#include <string>using…
Q: 6.22 LAB: A jiffy In computer animation, a "jiffy" is commonly defined as 1/100th of a second.…
A: This program first reads a floating-point number from the user and stores it in the variable…
Q: Your task is to implement the getHigherValue function which has the following details: Return type -…
A: character comparison is done based on the ASCII values As int hias higher range that char, casting…
Q: 1. Federal law requires that hourly employees be paid "time-and-a-half" for work in excess of 40…
A: #ask user for hourly wage hourly_wage = float(input('\nEnter hourly wage: ')) #ask user for Number…
Q: Question: Write a function to reverse the order of words in a given string. For example, if the…
A: Split the input string into a list of words.Reverse the order of the words.Join the reversed words…
Q: (Fraction calculator) | Write a program that lets the user perform arithmetic operations on…
A: Program code: //include the required header files #include<iostream> using namespace std;…
Step by step
Solved in 3 steps with 4 images
- C++ code: int v = 0, w = 1, int main(void) { W = z; V = W + x; y = W X; Z = z -1; } X = 2, y = = 3, z = 5;#include <iostream> #include <iomanip> #include <string> using namespace std; struct Teletype { string name; string phonenum; Teletype *nextaddr; }; void populate(Teletype *); void displayrecord(Teletype *); //void insertrecord(Teletype *); // create //void removerecord(Teletype *); //create //void modifyrecord(Teletype *); // create //int find(TeleType *, string); // Extra Credit create bool check(); int main() { int location = 0; int count = 0; char answery_n; Teletype *list, *current; list = new Teletype; current = list; cout << "Please "; do { count++; populate(current); if (check() == false) { cout << " Not storage available" << endl; } else { current->nextaddr = new Teletype; current = current->nextaddr;…EDITABLE C LANGUAGE SOURCE CODE: #include<stdio.h> int main(void) { int a, b; printf("Enter first number: "); scanf("%d", &a); printf("Enter second number: "); scanf("%d", &b); printf("Sum = %d", getSum(a, b)); return 0;} instructions are on the photo
- JSON Response example when code = BAHRAIN as follows: { "Country": "Bahrain", "Tenps"il ("day": "SUNDAY", "temp"i {"day": "HONDAY", "temp": 35), ("day": "TUESDAYr, "teng": 39), ("day": "WEDNESDAY", "tenp": 37),. ("day"i "THURSDAY", "tenp": 35), ("day"i "FRIDAV", "temp": 34), ("day": "SATURDAY", "teng": 37) 1. Implement find Templ ) function as follows: Sample Eample This function will be called whenever the user change the value of the pull-down menu. This function should contact Ve the Web Service API, sending the selected country code, to Co display the information (country, daily temperatures in the week and average weekly temperature) inside the div tag whose id -result as shown in the example on the right. Country ahraln In addition, the country name and the average temperatures should be saved as one JS object inside an array in a local storage. Whenever new request is made, the countrylaverage will be saved and added to the array inside the local storage (duplicates is allowed).…LOVELY PROFESSIONAL UNIVERSITY Academic Task No. 1 School : of Computer Science and Engineering Name of the faculty member_Ms. Gauri Mathur_ Course Code: CSE202 Faculty of: Technology and Sciences Course Title: Object Oriented Programming Program: Max. Marks: 30 Term: Is Rubric Applicable: No Date of Allotment: 26/02/2021 Date of Submission: 09/03/2021 Important Guidelines: 1. All questions in this Academic Task are compulsory. 2. It is mandatory to attempt all questions of the assignment in your own handwriting on A4 size sheets/pages with a blue colour ink pen. Any other mode of attempt (typed or printed codes or table) except hand written/drawn will not be accepted/considered as valid submission(s) under any circumstances. 3. Every attempted sheet/page should carry clear details of student such as Name, Registration number, Roll number, Question number and Page number. The page numbers should be written clearly on the bottom of every attempted sheet in a prescribed format as: for…Given a map pre-filled with student names as keys and grades as values, complete main() by reading in the name of a student, outputting their original grade, and then reading in and outputting their new grade. Ex: If the input is: Quincy Wraight 73.1 the output is: Quincy Wraight's original grade: 65.4 Quincy Wraight's new grade: 73.1
- Rectangle's Length and Width Code in C language // WARNING: Do not add, remove, or change anything before the line 19 of this file.// Doing so will nullify your score for the activity. #include <stdio.h>#include "rectangle.h" int get_length(Rectangle *rect);int get_width(Rectangle *rect); int main() { int ur_x, ur_y, ll_x, ll_y; printf("UR's X: "); scanf("%d", &ur_x); printf("UR's Y: "); scanf("%d", &ur_y); printf("LL's X: "); scanf("%d", &ll_x); printf("LL's Y: "); scanf("%d", &ll_y); // TODO: Initialize the points here // Point ... // TODO: Initialize the rectangle here // Rectangle ... // TODO: Call the get_length here int len = ___; printf("\nLength: %d", len); // TODO: Call the get_width here int wid = ___; printf("\nWidth: %d", wid); return 0;} // TODO implement get_lengthint get_length(Rectangle *rect) { return 0;} // TODO implement get_widthint get_width(Rectangle *rect){ return 0;} refer to pics for instructionsProblem 2: Route Planning You are on the development team for a Route Planning application. The team has already developed a class named NavigatorApp for storing and displaying the graph representing the road network. This class has a void displayShortestPath() function which takes the source and destination vertices of the trip and displays the shortest route between them. Using the strategy pattern, draw a class diagram of the system which will allow for the NavigatorApp to display the shortest driving, walking, or cycling route when the displayShortestPath() function is called. You can assume that another developer is in charge of making sure the appropriate strategy is correctly set and for calling the displayShortestPath() function Starter code /* Modify NavigatorApp (if necessary) */ class NavigatorApp { private: Graph map; public: void displayMap(Window * window); void displayShortestPath(Vertex source, Vertex destination, Window * window); /* write pseudo code for this function…A return; else #include using namespace std; void division (int num, int denom); int main() { division (5, -1); division (10, 2); return 0; } void division (int num, int denom) {if (denom using namespace std; int main() (char List[4][10] = {"kareem", "ahmed", "ali", "mohamed"}; cout<Javascript Programming <script>function getCardType() {var cNum1 = document.getElementById("ccNum1").value;var cardname = "";if (cNum1 != "") {if (cNum1.startsWith("4")) {cardname = "Visa";} else if (cNum1.startsWith("5")) {cardname = "MasterCard";} else if (cNum1.startsWith("6")) {cardname = "Discover";} else if (cNum1.startsWith("3")) {cardname = "American Express";}}document.getElementById("cardType").innerHTML = cardname;}</script></body>#include<bits/stdc++.h>using namespace std; // Class representing music dataclass Song {public:string musicName, musicDescription;};// Function to take input for music descriptionSong addDescription(){Song s1;cout<<"Enter the Music name : ";cin>>s1.musicName;cout<<"Enter the Music description : ";cin>>s1.musicDescription;return s1;} // Function to write music object details into a txt filevoid storeInfoToDatabase(Song s){ofstream fileObject;// Opening the file in append modefileObject.open("Database.txt", ios::app);fileObject << s.musicName;fileObject << " ";fileObject << s.musicDescription;fileObject << "\n";} // Driver Functionint main(){Song s = addDescription();storeInfoToDatabase(s);cout<<"Data written into file succesfully...";return 0;}Oop language (C++) Give source code and output alsoSEE MORE QUESTIONS