4) Write a general program that takes x-y coordinates of a point in the cartesian plane and prints a message telling either an axis on which the point lies or the quadrant in which it is found. Example: (-1.0,-2.5) point is in quadrant 3 (0.0, 4.8) point is on the y-axis Q2 Q1 Q3 Q4
Q: 1) Write a program that reads 3 integers and produce exactly one message of the following 3…
A: As programming language is not mentioned so we are providing answer in C++ language.
Q: H.w: write a visual basic program to read an integer number and check if it is positive or negative,…
A: Program code: Module Module1 Sub Main() Dim num As Integer = 0 Dim find_PrN As…
Q: 6-Write a PYTHON program that takes a date as input and outputs the date's season in the northern…
A: According to the question below the solution: Output:
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere…
A: Volume of a Sphere = 4/3*π*r³Area of a Sphere = 4*π*r²
Q: Write a program that takes a range from the user and display all the even numbers between the range…
A: Note - Since there is nothing mentioned about the programming language to be used, so this program…
Q: 2. Draw a flow chart that displays the squares of all the positive integers up (and including) 100…
A:
Q: 4)Write program that input the user age and print the sentence: a) You are child if the age is less…
A: There is not mentioned any programming language so I used JAVA Step 1 : Declare a variable age and…
Q: Q3: Write a VB program to enter a mark of a student and then find his grade as follows: If mark >=…
A: Get input from user and convert it to integer. Chek the input with all conditions and print output…
Q: Write a program that estimates the value of the mathematical constant e by using the following…
A: The given series program is as follows:
Q: The volume of a sphere of radius 1 inside a cube of side 2 is V= 4π/3. Write a fortran program t
A: Actually, program is a executable software that runs on a computer.
Q: 3. For three resistors connected in series, the total resistance is the sum of the individual…
A: Given: Resistors are connected parallel Therefore Total resistance is Total Resistance =…
Q: c++ Given two sequences with n integers between 0 and 9, interpreted as two n-digit integers,…
A:
Q: Write a program to enter a value of x and compute the value of y where x if x ≥0 -x if x < 0 y =
A: #include <stdio.h>int main(){ int x,y; printf("Enter value of x: ");…
Q: Write in symbolic form: For all integers x,there exists an integer y such that the sum of x and y…
A: A symbolic form of quantifier use symbols like ∀,∃ etc. to represent the statement. It help to…
Q: 1)Write program to make simple calculator? The program input two number and one character? a) print…
A: As programming language is not mentioned i am providing you the answer in C++.
Q: (Racket) Write sequences of cars and cdrs that will pick the symbol 'x out of the following…
A: Given: (Racket) Write sequences of cars and cdrs that will pick the symbol 'x out of the following…
Q: Q1/an A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid,…
A: Logic:- Given values of p=1000 vinf=1.25 A=0.25 Cd=0.09 We have to calculate Fd, Given formula:-…
Q: Q1: Write a C++ program to Calculate the Area of Circle? Q2: Write a C++ program to read three…
A: Part 1) Area of Circle ===================== #include <iostream> using namespace std; int…
Q: Suppose that x, y, and z are int variables and x = 13, y = 45, and z = 20. Determine whether the…
A: a. !(x - y <= 10) Decoding the above line is as follows, ==> !(13-45<=10) ==> !(-32…
Q: 1. Write a program that converts miles to feet. If the distance is more than 15,000 feet, tell the…
A: logic:- read values in miles. Multiply miles value by 5280 and store in feet variable. If feet…
Q: Q5: A/ Use input function to write a computer programming to test the weather state according to a…
A: Solution: The code for given questions is provided below. Here the variable 'x' is considered as…
Q: Q1/A-Write a program to compute the mass flow rate of a fluid (in kg/sec) through a thermal unit…
A: Code: Dim A as DoubleDim M as DoubleDim Po as Double Dim K as DoubleDim R as DoubleDim T0 as…
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Note: As no programming language is mentioned, therefore answering the given question in python.…
Q: 7. Make a program that will convert an inputted number in inches (in.) and display its equivalent…
A: The problem is based on the basics of C programming language.
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: 3) Given three decimal numbers x, y and z. Write a boolean expression that evaluates to true if an…
A: I have provided the boolean expression in step 2.
Q: Write a program that converts the angle from degree to radian and displays each value.
A: "Since you have asked multiple question,we will solve the first question for you.If you want any…
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: 1) Get input for value of x 2) IF x>0 z=x + 3e5 IF x=0 z=3/x + sin(x)…
Q: This program accepts the height of a person in centimeter and categorise the person according * .to…
A: A. 1-ElseIf((p >= 150) And (p < 165)) Then 2-ElseIf((p >= 165) And (p <= 195)) Then…
Q: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A:
Q: Write a program which input radius of circle and compute area of it. Then input the length of side…
A: EXPLANATION - Create a program . Declare three variable radius , length , area1 , area2 . Take…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: i tried like this in java code: java code: public class Test { static double compute(double…
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: I am giving most answers as per the Q/A expert community recommendation because the main question…
Q: 3. Write a program that outputs the value of x given by the formula X = 5(a+cos (π/3))" √(a²+b²)…
A: Below I have provided Java Programming. Also, I have attached the screenshot of the code and output…
Q: 6. Write a program to read a number representing the time in 24-hours (i.e., 4-digits ). Then find…
A: import java.text.SimpleDateFormat;import java.util.*;import org.apache.commons.lang3.time; class…
Q: Write a program to find the summation of two degrees, Find the grade using If - Block statement and…
A: Answer: Here not specify any programming language so we have code in C++ programming language…
Q: 3. Write a program that checks the screen time of a child and repeats, this procedure three times.…
A: #include<stdio.h>int main(){ int age; float screen_time; for(int i=0;i<3;i++){…
Q: Write a program that inputs a line of text, replaces all punctuation marks with spaces.
A: Program: //header files #include <iostream> #include <string> using namespace std;…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program code: // include required header files #include <iostream> #include <iomanip>…
Q: Write a program to check whether the message received at the destination is error-free. For…
A: Algorithm 1. Declare variable length1 and length2 to record length of both the sequence 2. Start…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: Given: The program is written in C language to find area and volume of sphere.
Q: In F95 language read input two positive integers l and b which are the length and breadth of a…
A: Write a program in F95 language to read input two positive integers l and b which are the length and…
Q: The ancient Greeks classified numbers geometrically. For example, a number was called "triangular"…
A: Sample Response: // C++ program to check whether a number is a triangular number or not by using…
Q: 1. Select the value for x that is a counter- example to the following statement: For every integer…
A: Answer : The correct options are (a) x = 1/2 and (d) x = 1 Attached the whole explanation for all…
Q: 02: Write program to read in the values of a, b, c then compute the root values (x) of the equation:…
A: Note: Answering the question in C++ as no programming language is mentioned. Task : Input a, b, c.…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: java code: public class Test { static double compute(double lat1, double lon1,…
Q: Write a program to enter a value of x and compute the value of y where x if x 20 -x if x<0 y=
A: I have provided C CODE along with CODE SCREENSHOT and 2 OUTPUT…
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Required: write a program to check if a triangle is valid or not and if valid then check if it is…
Q: rite a program that reads a value n and displays n characters alternating between # and % on the…
A: Note: Since you have not provided the language name to write the code so I am using java language to…
Step by step
Solved in 4 steps with 2 images
- discrete math programing python or c++ the range of values is from 0 to 5 Let Q(x, y) denote “x + y = 5” The domain of x and y is from range 0 to 5 . Implement the code that outputs the truth values of the following quantifications: 1. ∀x ∀y Q(x, y) 2. ∀x ∃y Q(x, y) **Display values of variables x and y if the quantification is true.Implement the following functions using c language. The functions return a real number: (a) Function Celsius returns the Celsius equivalent of a Fahrenheit temperature (Hint: 0 Celsius is equal to 32 Fahrenheit and 100 Celsius is equal to 212 Fahrenheit). (b) Function Fahrenheit returns the Fahrenheit equivalent of a Celsius temperature. Use these functions to write a program that prints charts showing the Fahrenheit equivalent of all Celsius temperatures between 0 and 100 degrees, and the Celsius equivalent of all Fahrenheit temperatures between 32 and 212 degrees. Print the output neatly in a table.Define a function called equation that calculates the following equation. Write a program that enters x and n, calls the function and prints the results. i=n Σ(0.2 cos- i=1 f(x) = 0.5 + ηπχ 2 nπx +0.3 sin
- : Given a boolean expression consisting of the symbols 0 (false), 1 (true), & (AND), I (OR), and / (XOR), and a desired boolean result value result, create a function that counts the number of ways the expression may be parenthesized such that it evaluates to result. The expression should be completely parenthesized (for example, (0) A(1)) but not excessively (for example, (((0)) / (1))).EXAMPLE \scountEval("l/01011", false) yields 2 counts."0&0&0&1All0", true) = 10Write a c++ program to assign passengers seats in an airplane. Assume a small airplane with seat numbering as follows: 1 A B C D 2 A B C D 3 A B C D 4 A B C D 5 A B C D 6 A B C D 7 A B C D The program should display the seat pattern, with an 'X' marking the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like this: 1 X B C D 2 A X C D 3 A B C D 4 A B X D 5 A B C D 6 A B C D 7 A B C D After displaying the seats available, the program prompts for the seat desired, the user types in a seat, and then the display of available seats is updated. This continues until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program should say that that seat is occupied and ask…..5-- I have a python programing question In 1937, a German mathematician named Lothar Collatz formulated an intriguing hypothesis (it still remains unproven) which can be described in the following way: 1. take any non-negative and non-zero integer number and name it c0; 2. if it's even, evaluate a new c0 as c0 ÷ 2; 3. otherwise, if it's odd, evaluate a new c0 as 3 × c0 + 1; 4. if c0 ≠ 1, skip to point 2. The hypothesis says that regardless of the initial value of c0, it will always go to 1. Of course, it's an extremely complex task to use a computer in order to prove the hypothesis for any natural number (it may even need artificial intelligence), but you can use Python to check some individual numbers. Maybe you'll even find the one which would disprove the hypothesis. Write a program which reads one natural number and executes the above steps as long as c0remains different from 1(c0 != 1). Moreover, we'll add another task - we want you to count the steps needed to achieve the goal.…
- 1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the user to enter a number from 1-6 and the corresponding hangman should be printed. The value the user inputs corresponds to the number of incorrect guesses in a real hangman game and so the completeness of the hangman will correspond to the number of ‘incorrect guesses’ inputted by the user (e.g., if the user enters 1, then only the head of the hangman will be printed; full example below). Example:Enter a number from 1-6: 1O Enter a number from 1-6: 2O|Enter a number from 1-6: 3O\||Enter a number from 1-6: 4O\|/|Enter a number from 1-6: 5O\|/|/Enter a number from 1-6: 6O\|/|/ \ 2. Modify your program from problem 1 so that the user input is checked to be a validsingle digit (1-6) before printing the corresponding hangman. If the input is not valid, theninstead of a hangman the following message should be printed “Invalid input: you must enter asingle number from 1-6.” Example:Enter a…A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid, the drag force is given by 1 F₁ =pV²ACD Take: p= 1000 kg/m3 is the density of fluid, V 1.25 (m/s) is the swimming speed, A=0.25 m² is the frontal area of the body, Cp=0.09 is the coefficient of drag. MatlapUse python The speeding ticket fine policy in Wonderland-Bemidji is $50 plus $5 for each mph over the limit, plus an additional penalty of $200 for any speeds over 90mph. Write a program that accepts a speed limit (<= 90) and a clocked speed, and either outputs a message indicating the speed was legal, or prints the amount of the fine if the speed is illegal.
- The equation of a line in standard form is ax + by = c , wherein both aand b cannot be zero, and a, b, and c are real numbers. If b≠0, then –a/b is the slope of the line. If a = 0, then it is a horizontal line, and if b = 0, then it is a vertical line. The slope of a vertical line is undefined. Two lines are parallel if they have the same slope or both are vertical lines. Two lines are perpendicular if either one of the lines is horizontal and the other is vertical or the product of their slopes is –1. Design the class lineType to store a line. To store a line, you need to store the values of a (coefficient of x), b (coefficient of y), and c. Your class must contain the following operations: If a line is nonvertical, then determine its slope. Determine if two lines are equal. (Two lines a₁x + b₁y = c₁ and a₂x + b₂y = c₂ are equal if either a₁ = a₂, b₁ = b₂, and c₁ = c₂, or a₁ = ka₂, b₁ = kb₂ and c₁ = kc₂, and for some real number k.) Determine if two lines are parallel. Determine if…Suppose two line segments intersect. The two endpoints for the first line segment are (x1, y1) and (x2, y2) and for the second line segment are (x3, y3) and (x4, y4). Write a program that prompts the user to enter these four endpoints and displays the intersecting point. As discussed in Programming Exercise 3.250, the intersecting point can be found by solving a linear equation. Use the LinearEquation class in Programming Exercise 9.11 to solve this equation.Q3. a) Write a program to find the resultant (R) of two forces F1 & F2 with angle 0 between them as: IF 0 = 0° IF 0 = 180 IF 8 = 90° R = F1 + F2 R = F1 – F2 R = (F1)2 + (F2)2 R = (F,)? + (F2)² – 2F1 + F2 + Cos 0 For any other 0. b) Write properties table for the following form, read the two numbers x and y , then find their summation and the difference between them: Feenl Y= FIND C-