Write a program that takes in an integer in the range 11-100 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. End with a newline. Ex: If the input is: 93 the output is: 93 92 91 90 89 88 Ex: If the input is: 11 the output is: 11 Ex: If the input is: 9. or any number not between 11 and 100 (inclusive), the output is: Input must be 11-100 For coding simplicity, follow each output number by a space, even the last one. Use a while loop. Compare the digits; do not write a large if-else for all possible same-digit numbers (11, 22, 33, ..., 99), as that approach would be cumbersome for larger ranges.
Q: What is an example of OOP abstraction utilizing many varieties of pizzas?
A: Abstraction is an object-oriented programming paradigm that "display" the important properties and "...
Q: Please answer it in Python Write a function pairsbypairslist that would return pair by pair from th...
A: PROGRAM INTRODUCTION: Declare an empty list. Take the number of elements for the list from the user...
Q: What are the various types of fields that are included in the instruction process?
A: Introduction: There are three fundamental fields in an instruction; these fields vary according to t...
Q: (Chapter 4 b) Given the following information: Job Arrival Time CPU Cycle A 15 B 2 C 3 14 D 10 E 9. ...
A: For the SJF algorithm the shortest job is done first but for no premtive when cpu is assigned to any...
Q: QUESTION 1 Write a complete program that consists of the main function that will call 4 user-defined...
A: logic:- To repeat users calculation, use while(1) loop and in one of choice put break. Use two fun...
Q: JAVA PROGRAMMING - Create a class whose main() holds an array containing 10 integers. Create two m...
A: Introduction JAVA PROGRAMMING - Create a class whose main() holds an array containing 10 integers...
Q: Build a splay tree by inserting the following numbers in this order: 44, 33, 26,14, 27 Show the tree...
A: Splay trees are self balancing trees which has following operations while splaying. I.e zig rotation...
Q: Python program using function as ojcets in High order function.This assignment of function into vari...
A: Python High Order Function As we must be aware of the basic concept of Python functions, we should m...
Q: fun g(a, b, c, d) = if c[b(a)] < 1.2 then 2 * b(a) else 2 * d * a Using Hindley-Milner type...
A: fun g(a, b, c, d) = if c[b(a)] < 1.2 then 2 * b(a) else ...
Q: 4- Name: FindMinInArray, Input: T (a sequence of n numbers T[1], T[2], ., T[n]), Output: min (the sm...
A: #include <iostream>using namespace std; void FindMinInArray(){ int n; cout<<"Enter...
Q: Function mergesort of type int listint list that sorts the given list of integers using the merge-so...
A: C++ Program: #include<bits/stdc++.h>using namespace std; /* Function List of type int that sor...
Q: Converting continuous data to discrete is called data __ in the KDD process.
A: KDD :- Knowledge Discovery in Database
Q: What are some of the many types of malware and what is their impact?
A: The Answer is given below step.
Q: Write JavaScript codes to validate a name text field so that when a user submits the form with the n...
A: function validateform() { var name = document.myform.name.value; var Regex =...
Q: What exactly is a database management system (DBMS)? Make a list of the positives and disadvantages.
A: Introduction: A database management system is abbreviated as DBMS. It is a collection of programmes ...
Q: What is the best way to get around an IP block?
A: Introduction: IP blocking refers to prohibiting external connections from specific IP addresses or r...
Q: Discuss and differentiate between bus interface unit(biu) and execution unit(eu) of 8086 microproces...
A: Execution unit and Bus Interface Unit are the two functional units of 8086 microprocessor.
Q: ABC is a pharmaceutical company that recruits volunteers for clinical trials on drugs currently unde...
A: No of entities: 1. Clinical Trial 2. Treatment 3. Dose 4. Drug 5. Volunteer Attributes of the ...
Q: Compare SISD, SIMD, MISD, and MIMD in detail
A: SISD - it refers to single instruction and single data stream. It used to represents a single comput...
Q: Write a program that reads a string of 5 characters and converts alternating characters to uppercase...
A: Iterate over the given string In even indices change it to upper case and in odd indices change it t...
Q: 2) What parameters are passed in this web string and what dynamic language do you think is being use...
A: The type of language is identified using the file extension we have Here, we are trying to load inde...
Q: What is Onion network?
A: Here is your Solution .
Q: To evaluate data quality, there are six elements to consider.
A: Introduction: We must emphasise the criteria that can be utilised to determine data quality.
Q: CPSC 131: Introduction to Computer Programming II Program 3: Inheritance and Interface
A: Ans: Program for inheritance: class Animal{ void eat(){System.out.println("eating...");} } cla...
Q: In terms of IT security, what are the differences between on-premises data centre and cloud security...
A: Introduction: On-premises data remains on-premises, eliminating the requirement for an internet conn...
Q: Build a splay tree by inserting the following numbers in this order: 44, 33, 26,14, 27 Show the tree...
A: The program is written in C++. Check the program screenshot for the correct indentation. Please chec...
Q: Using Python, write a program whose input is a string which contains a character and a phrase, and w...
A: I have provided PYTHON CODE along with CODE SCREENSHOT and 3 - OUTPUT SCREENSHOTS-----------
Q: What exactly is linking?
A: Linking: Linking refers to the process of collection and combination of different pieces of code an...
Q: What is the most efficient encoding high data rate, and why?
A: Encoding Encoding is the process of turning data, or a given sequence of characters, symbols, alpha...
Q: Each cloud provider has a product blueprint related to Big Data. Name and explain just one of the a...
A: what is Cloud Computing technique: The term cloud computing is the delivery of computing services ...
Q: List some of the advantages of understanding how to programme in assembly language.
A: Introduction: The following are the advantages of mastering assembly language programming:
Q: For CFG G3 = ({ S}, Eo1, R, S), where R = %3D %3D S - e| OS1S | 1S0S Convert Gs to a(PDA) All the st...
A: The steps to convert CFG to PDA: Remove the unit production. Change the CFG to GNF. No find the PDA...
Q: Explain why deep access is superior to shallow access from the perspective of a coder; avoid making ...
A: Introduction: For non-block structured languages, dynamic scope allocation rules are utilised.It def...
Q: Computer science Which protocol utilises SSL or TLS to safeguard browser-to-webserver connections?
A: Introduction: Which protocol utilises SSL or TLS to safeguard browser-to-webserver connections?
Q: s a constraint on frame size for it to w
A: The reason why CSMA/CD requires a constraint on frame size for it to work and state the minimal valu...
Q: What exactly is data-structure? What are the different types of data structures?
A: Introduction: The data structure, also known as the data element group, is a method for saving, orga...
Q: Q2: Write a program that reads in a series of integer numbers, and determines how many positive odd ...
A: Step-1: StartStep-2: Declare an arraylist list of integersStep-3: Declare two integer variable n and...
Q: Name three websites that employ the MVC design, which allows users to switch between different views...
A: Introduction: MVC is a software design pattern often used to create user interfaces. It divides link...
Q: What are the risks of putting in an always-on security system?
A: Introduction: Mobile malware is malicious software that has been built specifically for use on mobil...
Q: Advanced Physics Create individual MATLAB calculator for : Binomial Distribution Poisson Distributio...
A: According to the information given:- We have to create individual MATLAB calculator for Binomial , P...
Q: Write C++ code for the following tasks: Write a prototype for the function named fsum() that accep...
A: Note: As per our guidelines we are supposed to answer only one question for multiple questions and f...
Q: Define the rule echo(LST0, LST1). This rule describes LST1, which holds all the same elements as LS...
A: Introduction Define the rule echo(LST0, LST1). This rule describes LST1, which holds all the same ...
Q: Use the def keyword to create a funtion that will say. "Have a nice day!" You can name the function ...
A: We will see the above queries in python using Visual Studio Code : Code: def naming(name): ...
Q: Calculate the sum of numbers within an array You can create your own array of numbers but consider t...
A: // This program computes the sum of all the integers(+ve and -ve) in an array and prints the sum. ...
Q: Predict the output of the following code: 1 var msg = 'hello!"; for(var x = 24; x > msg.length + 6; ...
A: msg is initialized with hello! Then we have a loop which is iterating for some times and printing th...
Q: There are three ways to pass arguments to parameters in a function. List them. Python.
A: Following is the all possible ways to pass arguments to parameters in a function in python. 1. Way I...
Q: king strategy
A: given - How does data visualization enhance decision making strategy
Q: Determine the reliability between Devices A and B shown in Figure 1. Step-by-step calculations must ...
A: Five - nines Five-nines availability -- or 99.999% -- is the percentage of time a network component ...
Q: Q.Write a program to create a Distance class containing kilometers and meters as data members. Also ...
A: Program Explanation: Declare the header file Define a class for Distance Declare the instance varia...
Q: 8. Determine the twos' complement for decimal 94. Provide 10 answer in binary in a WORD size memory ...
A: Given decimal number is (94)10
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images
- Coral Help Write a program that takes a date as input and outputs the date's season. The input is an integer to represent the month and an integer to represent the day. Ex: If the input is: 4 11 the output is: spring In addition, check if both integers are valid (an actual month and day). Ex: If the input is: 14 65 the output is: invalid The dates for each season are:spring: March 20 - June 20summer: June 21 - September 21autumn: September 22 - December 20winter: December 21 - March 19Write a program that accepts a number corresponding to a plane figure: Right Triangle Rectangle Circle The program will then ask for the following: base and height – if the previous input is 1 (right triangle) width and length – if the previous input is 2 (rectangle) radius – if the previous input is 3 (circle)SPECIFICATIONS: - The program will then display the perimeter (circumference of the circle) and area of the chosen figure. You’re free to format the input/output display. The numeric output should be computed and NOT HARD-CODED. - The program will display “invalid input” if the initial input is not 1,2 or 3. After this, the program will terminate.- The next input (dimension/s of the chosen figure) will be stored on a float data type. The program will automatically terminate if the input is not a number.- Observe proper code indention - All lines should have a comment- Save your cpp file as Surname - PE (Example: Pangaliman - PE.cpp)TEST CASES: If the user inputs…Given the sample code below in generating a random number. Create a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated.If the number is 1, then the computer has chosen rock. If the number is 2, then thecomputer has chosen paper. If the number is 3, then the computer has chosen scissors.(Don’t display the computer’s choice yet.)2. The user enters his or her choice of “rock”, “paper”, or “scissors” at the keyboard.(You can use a menu if you prefer.)3. The computer’s choice is displayed.4. A winner is selected according to the following rules:a. If one player chooses rock and the other player chooses scissors, then rock wins.(The rock smashes the scissors.)b. If one player chooses scissors and the other player chooses paper, then scissorwins. (Scissors cuts paper.)c. If one player chooses paper and the other player chooses rock, then…
- In Python Write a program that computes the fuel efficiency for a multi-leg journey. The program will first prompt for the starting odometer reading and then get information about a series of legs. For each leg, the user enters the current odometer reading and the amount of gas used (separated by a space). The user signals the end of the trip with a blank line. The program should print the miles per gallon achieved on each leg and the total MPG for the tripWrite a program that computes the fuel efficiency for a multi-leg journey. The program will first prompt for the starting odometer reading and then get information about a series of legs. For each leg, the user enters the current odometer reading and the amount of gas used (separated by a space). The user signals the end of the trip with a blank line. The program should print the miles per gallon achieved on each leg and the total MPG for the trip.f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…
- Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderStatistics are often calculated with varying amounts of input data. Write a program that prompts for and takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Example program run (the user types only the numbers, in this case 15 20 0 5 -1): Enter numbers separated by spaces, with a negative number to quit: 15 20 0 5 -1 Average = 10 Max = 20 #include <iostream>using namespace std;/* program that prompts for and takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Example program run (the user types only the numbers, in this case 15 20 0 5 -1): Enter numbers separated by spaces, with a negative number to quit:15 20 0 5 -1 Average = 10 Max = 20*/ int main() { /* Type your code here. */ return 0;}In Coral Programing!! Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. Ex: If the input is 93, the output is: 93 92 91 90 89 88 Ex: If the input is 77, the output is: 77 Ex: If the input is not between 20 and 98 (inclusive), the output is: Input must be 20-98 For coding simplicity, follow each output number by a space, even the last one. Use a while loop. Compare the digits; do not write a large if-else for all possible same-digit numbers (11, 22, 33, ..., 88), as that approach would be cumbersome for large ranges.
- Python Write a program that receives a number from a user and checks if it's float or integer.In case of being float, print for the user that his/her number is float with integer part andfractional part. In case of being integer, print to the user that his/her number is aninteger and odd/even numbeRWrite a program that reads from the user a character ('q' or 'c'). If the character is 'c', the program reads from the user the radius rof a circle and prints its area. • If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. • Otherwise, it prints "Wrong character" PS: Use the following formulas: area of circle=3.14*r Sample Run1: Enter a character (q or c): q Enter the Length and Width: 80 150 |It is a rectangle Sample Run2: Enter a character (q or c): q Enter the Length and Width: 80 80 It is a square Sample Run3: Enter a character (q or c): c Enter the radius: 2 The area of the circle is 12.56 Sample Run4: Enter a character (q or c): d Wrong characterGiven the sample code above in generating a random number. Create a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows. 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. (You can use a menu if you prefer.) 13. The computer's choice is displayed. 4. A winner is selected according to the following rules: a. If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) b. If one player chooses scissors and the other player chooses paper, then scissor wins. (Scissors cuts paper.) c. If one player chooses paper and the other player…