4. Evaluate the following postfix expression. 355* + 5 7 + 6 / - The value of the above postfix expression is a. 26 b. 22
Q: -Write a program that asks the user to enter a person's age. The Problem 2: Age Classifier program…
A: EXPLANATION - In this program if and else condition is used to classify the age. First a variable…
Q: The internal path length is used to measure the cost of a successful search, while the external path…
A: Hey, since multiple sub part questions posted, we will answer first three questions according to our…
Q: Write a main function that performs the following: • Prompts user to enter 2 values A and B. • If…
A: Prompts user to enter 2 values A and B. If the first number A is less than the second number B,…
Q: Q1: Write a C++ program to calculate the diagonal of a rectangle. Users are required to enter the…
A: C++ Code for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: 1. Draw a histogram and frequency polygon for the data given below: Wages (in lakhs.) No. of workers…
A: Read the data for the wages and the corresponding number of workers from a data source.Create two…
Q: Q16/ Write a program that accepts a user-entered number and calculates the square root. Before…
A: Sample Response: //C++ program to calculate the square root of a user-entered number#include…
Q: QS: A/ Use input function to write a computer programming to test the weather state according to a…
A: #include <iostream> using namespace std; void checkWeather(int); int main(){ int…
Q: calculte the following formulation. "n" is entered by user. 2x + ("/x) > (1 + 2 x=1 a-Dont use pow…
A: Logic:- define FuncPow taking x as parameter . Iterate from i=1 to i=x cal=cal*2 End…
Q: Q5. (Find the second lowest interger number) Write a program that prompts the user to enter a set of…
A: NOTE : As the question is not specific about the programming language to be used , so C++ will be…
Q: 2. Complete the function avg5 to return the average of five numbers. Use the accumulator pattern.…
A: # Function to calculate the average of 5 numbersdef avg5(num1,num2,num3,num4,num5): #…
Q: State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter. a.…
A: read write order always matter if we have the same variable in which we have to read and write and…
Q: Complete the code as below mentioned. Write all
A: Here, in this question, we are asked to develop a GO code. It is stated that the amount of potatoes…
Q: 7- You are creating an application which requires the user to input their password for logging into…
A: No type conversion necessary, since the input, will already be the appropriate type for text (str).…
Q: Functions Exercise (Parking Charges) A parking garage charges a $2.00 minimum fee to park for one…
A: Source Code :-#include <iostream>#include <iomanip> using namespace std; /** * Creating…
Q: I'm really fond of even numbers, you know? That's why I'll be letting you make another even number…
A: Task :- Write a C program to print the even numbers in given range. C program :- #include…
Q: 2- Write a pyhton function that prompts the user to input three integers and prints the sum of those…
A: Given: 2- Write a pyhton function that prompts the user to input three integers and prints the sum…
Q: What does the following code segment output? Assume that a variable is declared.
A: Note: In while() loop there is No updating of variable (count) . therefore, loop will continue to…
Q: 10. Given the argument: Q> (A v M) / A>(Wv C) / M> (E v C) / ~(W v E)_// Q=C This argument is: a.…
A: Please see the next step for solution
Q: Which of the following statements are equivalent? Which ones are correctlyindented?
A: In the above statements,all statement contains Two if statement, One else if statement, and One…
Q: 9. In the following code, what values of c get displayed by the MsgBox statement? Dim i As Integer…
A: Task :- choose the correct option for given questions.
Q: which of the following statement(s) increment the value of num? a. p++; b. (*p) ++; C. num++ d.…
A: We are given 4 options in which we have to choose which will increment the value of variable num.
Q: Rewrite the following code segment using conditional operators (?/:) double discount_percent; if…
A: The conditional (ternary) operator is the only JavaScript operator that takes three operands: a…
Q: 21: Write a C++ program to calculate the diagonal of a rectangle. Users are required to enter Ehe…
A:
Q: BST operations are linear if balanced and logarithmic if degenerate. The average case for BSTS is…
A: Hey, since multiple sub parts questions posted, we will answer first three questions according to…
Q: a ylivia everi 2) Activity 3: Skill-building Activities (with answer key) (18 mins + 2 mins…
A: Answer is in next step.
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: Operators with the same precedence are evaluated in which manner? a. Left to Right b. Right to Left…
A: operators with the same precedence are evaluated in left to right manner.
Q: 3. Evaluate the following Postfix Expression 623 + - 38 2/ + * 2 & 3 +
A:
Q: 1. (Implement MyMap using open addressing with quadratic probing) Create a new concrete class that…
A: MyMap.java public interface MyMap<K, V> { /** Remove all of the entries form this map */…
Q: #include #include #include #define p prin #define c cprin #define s scanf #define g goto #include…
A: The error is: 1.#include <conio The correct statement is : #include <conio.h>…
Q: What does this function using to? int max(int a , int b) { if(a > b) return a; else return b; }…
A: Here, I have to choose an option for the given question.
Q: Q3: Create the equivalent of a four-function calculator. The program should ask the user to enter a…
A: As programming language is not mentioned, this question is solved in C++.
Q: Which one is correct for the statement? int *ptr, p; *
A: Pointer: It is a variable that stores the address value of another variable. or we can say that it…
Q: This pseudocode is intended to display // employee net pay values. All employees have a standard //…
A: Program plan: Declare the variable name Define the variable EOFNAME as "ZZZZ" Define DEDUCTION as…
Step by step
Solved in 2 steps
- Problem:Write a program that reads a list of integers from the keyboard and creates thefollowing information.a. Finds and prints the sum and the average of the integersb. Finds and prints the largest and the smallest integerc. Prints a Boolean (true or false) if some of them are less than 20d. Prints a Boolean (true or false) if all of them are between 10 and 90The input data consist of a list of integers with a sentinel. The program mustprompt the user to enter the integers, one by one, and enter the sentinel whenthe end of the list has been reached. The prompt should look like the following: Enter the numbers with <return>(99999 to stop):The output should be formatted as shown below: The number of integers is: xxxThe sum of the integers is: xxxxThe average of the integers is: xxx.xxThe smallest integer is: xxxThe largest integer is: xxxAt least one number was < 20: <true or false>All numbers were ( 10 <= n >= 90): <true or false>Code should be correct else dislike. Please do asap.Give the index of the pivot value after the whole list below has been partitioned using the median-of-3 value as the pivot value. [93, 49, 60, 65, 40, 74, 50, 69, 58, 97, 64] Notes: • Your answer should be a single valid, non-negative, literal Python int value. For example, 123 is a valid int literal. • This is not asking for the complete quicksort. • Hint: you don't have to get everything in the exactly the right place, just the pivot value. You can do a rough partition, ensuring each value is on the appropriate side of the pivot value. • You can pre-check your answer (to check it's a valid, non-negative, literal int). Answer: (penalty regime: 10, 20, ... %) Precheck Check
- 4. Write a program to declare a stack of char data type and insert all the lowercase alphabets in it, and print them by popping them back out of the stack.python: def character_gryffindor(character_list):"""Question 1You are given a list of characters in Harry Potter.Imagine you are Minerva McGonagall, and you need to pick the students from yourown house, which is Gryffindor, from the list.To do so ...- THIS MUST BE DONE IN ONE LINE- First, remove the duplicate names in the list provided- Then, remove the students that are not in Gryffindor- Finally, sort the list of students by their first name- Don't forget to return the resulting list of names!Args:character_list (list)Returns:list>>> character_gryffindor(["Scorpius Malfoy, Slytherin", "Harry Potter, Gryffindor", "Cedric Diggory, Hufflepuff", "Ronald Weasley, Gryffindor", "Luna Lovegood, Ravenclaw"])['Harry Potter, Gryffindor', 'Ronald Weasley, Gryffindor']>>> character_gryffindor(["Hermione Granger, Gryffindor", "Hermione Granger, Gryffindor", "Cedric Diggory, Hufflepuff", "Sirius Black, Gryffindor", "James Potter, Gryffindor"])['Hermione Granger, Gryffindor',…python: def character_gryffindor(character_list):"""Question 1You are given a list of characters in Harry Potter.Imagine you are Minerva McGonagall, and you need to pick the students from yourown house, which is Gryffindor, from the list.To do so ...- THIS MUST BE DONE IN ONE LINE- First, remove the duplicate names in the list provided- Then, remove the students that are not in Gryffindor- Finally, sort the list of students by their first name- Don't forget to return the resulting list of names!Args:character_list (list)Returns:list>>> character_gryffindor(["Scorpius Malfoy, Slytherin", "Harry Potter,Gryffindor", "Cedric Diggory, Hufflepuff", "Ronald Weasley, Gryffindor", "LunaLovegood, Ravenclaw"])['Harry Potter, Gryffindor', 'Ronald Weasley, Gryffindor']>>> character_gryffindor(["Hermione Granger, Gryffindor", "Hermione Granger,Gryffindor", "Cedric Diggory, Hufflepuff", "Sirius Black, Gryffindor", "JamesPotter, Gryffindor"])['Hermione Granger, Gryffindor', 'James…
- 5. Write a program to declare a stack of char data type and insert all the uppercase alphabets in it, and print them by popping them back out of the stack.Exercise 1: Write a program using the java.util.Stack data structure that prompts for an integer and reverses it: 7359 becomes 9537. Hints: Think of how base-10 works: A base-10 number is a sum of digit * 100 + digit * 101 + digit * 102, etc., where each digit in your number is that digit times a power of 10. Using that understanding, you can use modulo and integer arithemetic to get each digit and add it to a stack. Algorithm: Your number % 10 will give you the rightmost number. Example: 7359 % 10 = 9. Put the 9 on the stack. Now substract the 9 from original number: 7359 - 9 = 7350. Now take the 7350/10 to remove the zero. That is 7350 /10 = 735. Repeat the process, that is 735 % 10 = 5, put the 5 on the stack, substract the 5 and divide by 10. 730/10 = 73, use 73 % 10 to get the 3. Keep going, adding digits to the stack until you run out of numbers. When you pop the numbers off your stack, they will come off teh stack reversed. Note…help pleeasee Create a C code that will allow the user to input a word and check whether it is a palindrome or not. Also input the reversed string of the word. Use a stack to reverse the order of a string and identify whether it is a palindrome or not. It should not be case-sensitive. Example 1: Input string: Racecar Reversed string: racecar Palindrome: Yes exampl 2: Input string:ToyotA Reversed string: atoyot Palindrome: No Note: maximum string length is 20
- This is a pyhton , Coding the screenshot better explains. It talks about listQ4. Write a program that read 2 matrices and has a function which finds their sum. Q5. Write a program that read 2 matrices and has a function which finds their multiplication. Q6. Write a program that handles a list of numbers where it has the following functions - Function that finds their average and sum - Function that finds their maximum and minimum - Function that search for a given number in that list. - Function that count the occurrence of a given number in that list. Then the program should do the following: - Read the list - Find the average and the sum of that list - Find the minimum and the maximum of that list - Count the occurrence of a given number in that list.10. Given a list of unsorted integers, find the pair of elements that have the smallest absolute differencebetween them. If there are multiple pairs, find them all.Input FormatThe first line contains a single integer , the length of the list.The second line contains space-separated integers, .Output FormatOutput the pairs of elements with the smallest difference. If there are multiple pairs, Output any one of them.Sample Input 010-20 -3916237 -357920 -3620601 7374819 -7330761 30 6246457 -6461594 266854Sample Output 0-20 30Explanation 0(30) - (-20) = 50, which is the smallest difference.Sample Input 112-20 -3916237 -357920 -3620601 7374819 -7330761 30 6246457 -6461594 266854 -520 -470Sample Output 1-520 -470Explanation 1(-470) - (-520) = 30 - (-20) = 50, which is the smallest difference. Only the first pair is given as output.Sample Input 245 4 3 2Sample Output 22 3