Reads in the coordinates of two points, computes the slope of the line through the two points, and outputs the message "Negative slope", "Zero slope", "Positive slope" or "Infinite slope" depending upon whether the slope is negative, zero, positive or infinite.
Q: The program Telephone Digits outputs only telephone digits that correspond to uppercase letters.…
A: Programming language is not mentioned in the question. So the below program is written in C++…
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: Here I have first asked the user to enter the average bill. Now I have used the if-else block to…
Q: Please write a program to get value from P0 and send to P2, continuously.
A: INTRODUCTION: ORG(origin): The commencement of the program is indicated by this instruction.…
Q: write a program to input 3 integers and determine which of them is biggest:- Using if(. ) &&(. )
A: We are using only the if conditions here according to the question. The program is written in C…
Q: Write a Python program that asks the user for quantity and takes some marks out of 100 as input.…
A: Task :- Write a python program for given task. Python program :- n = int(input())marks = [] #…
Q: 30. If originally x=4, what is the value of x after the evaluation of the expression: x+=x+3
A: The value after evaluation will be 11. #include <iostream> using namespace std; int main(){…
Q: Write a program to enter three angles from the user and determine if the three angles represent a…
A: Please find the answer below :
Q: Write a program that will accept 2 integers. Determine and print the higher number and th ower…
A: SUMMARY: - Hence, we discussed all the points.
Q: Take a string from the user and then perform addition on integer present on that string using the…
A: Accept input as string and then split it to list based on space Now convert these numbers to…
Q: write a programm to calculate housing insurance? use this formula: X/150*y/s*50 x is the total…
A: The problem is based on the basics of arithmetic operations in programming languages. NOTE: The…
Q: Please write sequences of cars and cdrs that will pick the symbol 'x out of the following…
A: Write sequences of cars and cdrs that will pick the symbol 'x out of the following expressions. Let…
Q: Q2) (A) Write the following expressions in F 1- If af 3, y ax 2- z = x+ y "3
A: Consider the first expression 1-If a!=3,y=ax
Q: Write a program to calculate the following equation cos(x) 2+x* ly? – x|
A: Start. Read the input. Perform the operations using the calculations given. Print the output. Exit.
Q: Write a python program to accept 1 number as input from user if number is negative, Display all even…
A: Required:
Q: am to get two numbers from user and print absolute difference betw
A: Below the python program to get two numbers from user and print absolute difference between those…
Q: Write a program to calculate the following equation cos(x) 2 * x * + ly? – x|
A: Given: We have to write a program to calculate the following equation. You have not mentioned…
Q: Given an integer representing a 10-digit phone number, follow the TODO comments to complete that…
A: So, the Python code of the given problem is: Input: # User is prompted to enter phone number…
Q: /Write the program to input the value of x and print the following message: X value odd Massage…
A: As there is no programming language mentioned so i attempted this question in c++ language here user…
Q: What is the output of the following code if the value of the variable A is equal to 80: if (A > 90)…
A: Ans: The correct option is d i.e. C
Q: x and y are two integers. Which of the following is not equivalent to the others?…
A: Please find the answer below
Q: (LMC) Ask the user to input two numbers. If the first number is greater than the second, output 1;…
A: LMC = Little Man Computer. It is a model of computer which is used to teach students about…
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: avgbil = int(input('Enter average bill: '))if 0<=avgbil<=75: print("Normal")elif…
Q: To test whether x is between 10 and 100, which of the following expressions are correct? a. 100 >…
A: Answer: Boolean expression: An expression that produces a boolean value, that is true or false, when…
Q: 3- Write a program which accept a number of 2 digits and check if ones digit is greater than the…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: a- if(x>0){ if(y>0) S.O.P("A");} b- if(x>0 || y>0) 5) x and y are two integers. Which of the…
A: GIVEN : x and y are two integers, which of the following is not equivalent to other ? a)…
Q: Consider the code below. What is the output for x = 69? if x 10: print('Greater than 10') elif x >…
A: Question given - A Python code segment is given, that check a multiple if - elif - else statement…
Q: ompute the sum of the two given integer values. If the two values are the same, then return triple…
A: NOTE: The given problem doesn't include the programming language use to code the solution so I am…
Q: What will be the output of the following: X = 15 y 10L print (x %% y)
A: The output of the given R program is given in the next step with explanation.
Q: Q13: Write a program to read X and print Sin X if X>0, square root X f X<0 and absolute X if X/2 is…
A:
Q: Write a program that accepts two numbers and determines whether they are equal. If they are equal,…
A: According to the question: We have to write a program that accepts a number and determines whether…
Q: A local pizza shop is selling a large pizza for $9.99. Given the number of pizzas to order as input,…
A: import java.util.Scanner; public class LabProgram{ public static void main(String[] args) {…
Q: Give the output of the following code based on the given inputs. The body mass index (BMI) is…
A: Python Program: # For declaring the variables height = 0.0 weight = 0.0 BMI = 0.0 # Taking the…
Q: Write a program using if else or switch cases only that prompts the user to input three (3)…
A: The program is written in C++. Check the program screenshot for the correct indentation. Please…
Q: Suppose x is 8 and y is 10. Choose the value of the following expression: (x == 8) or (x > y)
A: Given x is 8 and y is 10 x==8 is true x>y is false (x==8) or (x>y) is (true) or (false) is…
Q: Write a program that takes a number from user and calculate the factorial of that number.
A: factorial of a user-given number in python is detailed below.
Q: Q1}Depend on the value of the variable w, write program that calculate the following: 1 y = + Vx…
A: A mathematical expression can be evaluated using mathematical operators and functions. Regular…
Q: Given int x = 3; int y = 7; double z = 2.5; and double w = 0.5; evaluate the C++ expressions if…
A: Given int x = 3; int y = 7; double z = 2.5; and double w = 0.5; evaluate the C++ expressions if…
Q: please no copy from internet Write a python program to find factorial of the given number?
A: Factorial of a Number Factorial of a number is define as the continuous product of numbers starting…
Q: What is the output of the following code if the value of the variable A is equal to 80: if (A > 90)…
A: please check the solution below
Q: Read one positive integer number. If the input is below 10 or negative, print the message ‘the…
A: Required: Read one positive integer number. If the input is below 10 or negative, print the…
Q: Given a line of text as input, output the number of characters excluding spaces, periods,…
A: 1. input a string 2. set the counter to 0 3. now iterate over the string 3.1 if the current…
Q: Consider the value of a=12 and value of b=40. a=a+b b=a+b C=a+b d=a+b+c print(c) print(d) What is…
A: Consider the value of a=12 and value b=40 for the program a=a+bb=a+bc=a+bd=a+b+cprint(c)print(d)…
Q: Q2/ Write a program to compute the value of y for -5 ≤ x ≤ 5.5 y = ex+2 if x < -1 y = 2 + сos(¹x)…
A: Code: format shortGx=-5:5.5;y=zeros(1,length(x));for i=1:length(x) if(x(i)<-1)…
Q: After the following statements, what are the values of x and y? * x - 15 y = x x - 22 O x is 15 and…
A: After the following statements, what are the values of x and y? * x = 15 y = x x = 22 O x is 15…
Q: QI) Write a program to test the degrees of 100 students, If the student's degree is a floating, it…
A: here is the program to test the degree of 100 students :
Q: Write a program to compare your name with your surname. The output should state whether your name is…
A: Note: since programming languages is not mention we are provide solution in java. Note: your name…
Q: Given two numbers that represent the lengths of a right triangle's legs (sides adjacent to the right…
A: from math import sqrta = float(input())b = float(input())c = sqrt(a**2 + b**2)print("Hypotenuse:…
Q: Trace the integer variables in the following code: int x = 1; int y = 6; while (x 4) { x = x + 1; y…
A: GIVEN:
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- A certain CS professor gives 100-point exams that are graded on the scale90-100:A, 80-89:B, 70-79:C, 60-69:D, <60:F. Write a program that accepts an exam score as input and prints out the corresponding grade.Get three exam grades from the user and compute the average of the grades. Output the average of the three exams. Together with the average, also include a Remark: Passed in the output if the average is greater than or equal to 70, otherwise output Remark: Failed.C++ : Write a program that, given the time duration of a task in the number of hours,minutes, and seconds, calculates the duration in seconds.
- An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The spilled oil sits on top of the water and causes a natural disaster. For simplicity, suppose that the oil sits on top of the water in the form of a circle. Write a program that prompts the user to enter the rate at which the ruptured pipe pumps oil (in gallons) per minute, the thickness of the oil on top of the water, and the number of days for which the area is covered by the spilled oil. The program outputs the spilled area (in kilometer) and the volume of oil (in gallons) on top of the water after each day.(This if for mindtap on cengage, if not possible, use devc++ 5.11 but mindtap is more accurate, mindtap is very tricky with wording so please make sure everything is word for word on the sample picture) Write a program that allows the user to enter the last names of five candidates in a local election and the number of votes received by each candidate. The program should then output each candidate’s name (Candidate), the number of votes received (Votes Received), and the percentage of the total votes received by the candidate (% of Total Votes). Your program should also output the winner of the election. Your program must contain at least the following functions: a function to determine the sum of votes. a function to output the winner of the election.Exercise 3.9Modify program P34_1.cpp to compute the side area, total area, and volume of a cylinder and thearea and volume of a sphere, depending on the choice that the user makes. Your program shouldask users to enter 1 to choose cylinder or 2 for sphere, and display an "invalid choice error" forother values.For a cylinder, we want to compute:Side area: (2*PI*r) * hTotal Area: 2*(PI*r2) + Side areaVolume: (PI*r2)*hFor a sphere, we want to compute:Surface area: 4*PI*r2Volume: (4.0/3.0)*PI*r3.Use overloading whenever possible.Call your new program Ex39.cpp.
- CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZENIF YES, THEN GIVE 20% OFF IF HE IS BOTH PWD AND SENIOR CITIZEN, GIVE 20% ONLY ASK IF HE HAS A MEMBERSHIP CARD. IF YES, GIVE ANOTHER 3% OFFActive buzzer project: Write an algorithm for the below code for all steps. Then write a conclusion (test&debug) for the code. Also, write comments for the code explaining each line.Print the words in alphabetical order. For each problem, use java scripting to print the problem number followed by whatever output the task requires. Output a blank line between problems. Ask the user for an amount of change between 1 and 99 (use an integer). Print the number of quarters, dimes, nickels, and pennies required to yield that amount. For example, if the user enters 43, then the output is 1 quarter, 1 dime, 1 nickel, and 3 pennies. If the user enters 57, then the output is 2 quarters, 1 nickel, and 2 pennies.
- Using Flowgorithm, I have to create a guessing game. I have to let the user know if they are correct, too high or too low.Please do this in Python Programming and provide Screenshots The output should be exact same like in the examples. If the output in the example is in 2 decimals, then it should be like that. 1c - Othello 1 Othello, is a 2-player deterministic (no use of dice), perfect information (no information only known to one of the players) board game, similar to chess or go. The goal of this assignment is to give some information about the outcome once an Othello game has finished. This information is obtained by two measurements: The percentage of black pieces of all the pieces on the board. The percentage of the board that is covered in black pieces. The Othello board measures eight squares by eight squares, making the total number of squares sixty-four. Write a program that takes the number of white pieces followed by the number of black pieces as input. Print the two percentages as output. Enter the number of white pieces on the board: 34Enter the number of black pieces on the board:…Complete the expression so that user_points is assigned with 0 if user_items is less than 30 (second branch). Otherwise, user_points is assigned with 10 (first branch). user_items = int(input()) # Program will be tested with values: 15, 20, 25, 30, 35. if ''' Your code goes here ''': user_points=10 else: user_points=0 print(user_points)