3. Display a decimal number and then display it rounded and truncated. Use a number where rounded and truncated will display different values.
Q: setprecision (n) : when used in conjunction with fixed, set the number of digits after the decimal…
A: Below is the code and sample output:
Q: hat is the lvalue assigned to given the following? int('9.9') = integer A.…
A: “int ('9.9')”- Based on this code, the integer type is stored by using the syntax of string…
Q: The area of rectangle can be calculated with the following formula: Area = Width X Height Assuming…
A: height=20.3def area(width): return width*heightprint("Area of Rectangle if the width is 15.2:…
Q: Q1:\Write a program to check the temperature of a person and print the status in textbox.…
A: Form Design and Code Result:
Q: What will the following code display?numbers1 = [1, 2, 3]numbers2 = [10, 20, 30]numbers2 +=…
A: Given: What will the following code display?numbers1 = [1, 2, 3]numbers2 = [10, 20, 30]numbers2 +=…
Q: Write a program which reads two integer values. If the first is less than the second, print the…
A: Here I have declared 2 variables num1 and num2 of integer data type. Next, I have taken input from…
Q: python Write a program that displays a table of Celsius temperatures and equivalent Fahrenheit…
A: PROGRAM APPROACH: Defining a main function and printing a message to show the Celsius (CEL) and…
Q: palindromic prime is a prime number and also palindromic.For example, 131 is a prime and also a…
A: Program: //Definition for class "Main" public class Main { //Definition for main class public…
Q: Show what the program segment would display on the screen. int x = 2; int y = 4; cout << x++ << --y…
A: Program- Output-
Q: Write a program that finds the smallest number i
A:
Q: EX 3 using one print statment, print out "the answer to everything is 3" you must create the number…
A: Given that, We need to print "the answer to everything is 3" The number is must be result of adding…
Q: Exercise 5: ■ Write a program that finds the summation for the odd and even numbers [for the numbers…
A: 1.Write a program that finds the summation for the odd and even numbers [for the numbers from 0 to…
Q: Create a program that will display the geometric sequence of an input number and input common ratio.…
A: Introduction: Geometric Sequence: It is the sequence in which each term is obtained by multiplying…
Q: The great circle distance is the distance betweentwo points on the surface of a sphere. Let (x1, y1)…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
Q: The star player of a high school basketball team is 73 inches tall. Write a program to compute and…
A:
Q: With the statement, int a=1; With the statement, while(a<=5){ int x=1; a++; while(x<20) { printfl"%d…
A: GIVEN:
Q: Write the JS Code for the following Programs Test whether the Input Number is ODD or EVEN Test…
A: 1. Javascript program of the given problem is as follows: <!DOCTYPE…
Q: initialize a decimal point number from user .seprate number before and after decimal.Display number…
A: #include<iostream> using namespace std; int main(){ double num; cout <<"Enter Number…
Q: The formula below decribes how to convert a temperature on the Fahrenheit scale to a temperature on…
A: I have written this program in c language Alogrithm: 1.Declare float variable TempK and TempF…
Q: Write a program to enter(15) numbers by using inputbox function and then find the average of…
A: I write the below code to execute the problem in Python. ---> First I wrote a few lines of code…
Q: Question 1 Simplify the following expression using tabulation method: F(x,y,z) = x'y + xy' + xyz'
A: Given Expression : F(x,y,z) = x'y + xy' + xyz'
Q: N1, N2 and Nn print the largest number of them for example
A: a flowchart to read N numbers: N1, N2 and Nn print the largest number of them for example
Q: Q2): Draw a flowchart to read N numbers, calculate and print the largest and smallest number.
A: Give To draw a flowchart to find smallest and largest number in a array.
Q: 6. Odd to n by Jemar Jude Maranga Write a program that will take as input an integer n and will…
A: C++ program to find the odd number between 1 and input integer n
Q: ((PYTHON)) Q1- Ask the user to write a number 8 times. Find the sum and the average of all those…
A: Hi, as there are multiple questions in this post, as per our policy, I'll answer the first question…
Q: Suppose a right triangle is placed in a plane as shown below. The right-angle point is at (0, 0),…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: Take an unknown number of positive integers as input. Assume that the first number is always smaller…
A: Start Take the array of elements. Find the second Smallest element in an array. Print element Stop
Q: You are required to write a program to compute the area of square (area = side) OR a triangle (area…
A: Required:
Q: (Converting Fahrenheit to Celsius) Write a program that converts integer Fahrenheit temperatures…
A: Since the programming language is not mentioned, I have coded this using C language.
Q: The powers of 2 are: 1, 2, 4, 8, 16, 32, .. . Write a program to display the first power of 2, which…
A: Here i am using C++ program.
Q: 2. Write math random statement to generate each of the following: 1. random number between 0 and 1.…
A: We can generate math random integers using: (int)(Math.random()*(max-min)+min) Following are the…
Q: The area of rectangle can be calculated with the following fomula: Area = Width X Height Assuming…
A: As You have not Mentioned the language I am going to do it in C++, if you want a solution in another…
Q: 1. Write a program that will ask the user to enter a number n and display the numbers from 1 to n on…
A: THIS PROBLEM IS BASED ON MULTIPLE QUESTIONS. ONLY FIRST QUESTION IS SOLVED. KINDLY SEND THE OTHER…
Q: Q1/ Write a program to read 3 numbers, and write the largest and smallest numbers. using visual…
A: Code: Module Module1 Sub Main() 'Declare 5 variables of type Integer Dim intFirst…
Q: 2. Randomly generate an integer umber in range [100, 999]. (a) Check if this number is even or odd,…
A: Given: To write a program to generate an integer number in range[100,999] and print according to…
Q: write a js code that enter two integers ab with a difference of 1000, and then randomly generate 10…
A: Here have to determine about javascript code to print random odd number.
Q: What does the following code display?numbers = [1, 2, 3, 4, 5, 6, 7, 8]print(numbers[-4:])
A: here number is a list with values 1 to 8. numbers[-4:] means it will print all element from index -4…
Q: Q2: Write a code program to calculate and display the value of (S) from the following series. 1-…
A: The solution to the given problem is below.
Q: Q6) Write the code of VB program to find the summation of even numbers and odd numbers separately by…
A: Steps to create the Form window in Visual Basic. Open Microsoft visual basic .NET application…
Q: 1- Define a variable to hold student name, ex: "john smith" 2- For each letter in your name print…
A: CODE : public class Count { public static void main(String[] args) {…
Q: 2. Write math random statement to generate each of the 1. random number between 0 and 1. 2. random…
A: random() method is a static method of the Math class. It generates only double type random number in…
Q: 1# Write a program that allows users to choose from one of three shapes: Squares, Circles or (right)…
A: As programming language is not mentioned so we are solving this in C++
Q: 5. The user will input a Philippine amount, then the said amount will be converted to different…
A: Note: As per our guidelines we are supposed to answer only one question. Kindly repost other…
Q: 2. Randomly generate an integer number in range [100, 999]. (a) Check if this number is even or odd,…
A: According to the Question below the solution: Output:
Q: 1- The integers from 100 down to 0 by fives; that is, the first three lines should be 100, 95, 90,…
A: The program used the for loop to print the numbers fro 100 to 0 multiples of 5. For loop starts from…
Q: Q3: - Write a visual basic program that reads two integers (feet and inches) representing distance,…
A: Visual Basic (VB) is a third-generation programming environment from Microsoft. The system works by…
Q: You must write a script that prints a table of inches and their equivalent centimeter values. You…
A: def print_table_header(): print("\n\t Inches \t Centimeters") print("-"*50) def…
Q: complex number
A: import java.lang.Math; //Complex class.public class Complex implements…
Q: What would be the value of variable number2. Assume that each expression in a, b, and e has been…
A: answer along with explanation and screenshot is given below
Q: (Display Magic Numbers) Display the first N magic numbers, where N is a positive number that the…
A: Mathematical calculations are done in C++ using arithmetic operators, such as +, -, /, * for…
Need help starting from question 3!
Step by step
Solved in 2 steps
- Delete the index named ITEM_INDEX3.SBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID DBS311 Your Name use the following statement to Write a PL/SQL Function that accepts 4 parameters, 2 strings representing students names, and 2 integers representing the marks they received in DBS311. The function will determine which student had the higher mark and return the name of the student. If the marks were the same, then return the word "same" and return "error" if an error occurs or the calculation can not be determined.Online shopping system & online book store: Rebuild View/Edit cart and checkout pages using PL/SQL like the following: Create a function/procedure to update the quantity of the product in the cart if the new quantity is available in the store. Create a trigger that deletes the product from the cart after updating the quantity to 0. Don't forget to return the old quantity to the store. Create a trigger that empties the customer cart after the customer clicks on the checkout.
- Please written by computer source 1. For this project, you need to create the company database and populate it with the data given in the Oracle SQL PLUS environment (if you have not done so) 2. Your SQL commands should be placed in file(s) and run from the file(s). 3. Implement Triggers on all the tables to change character data to uppercase in the character data type columns. 4. Implement a Function that returns Dname from Department for any give employee. The parameter to the function would be the SSN. 5. Implement a Function that returns manager’s full name for any given department. The parameter to the function would be the department name. 6. Implement another Function that returns manager’s full name for any given department. The parameter to the function would be the department number. 7. Implement a Procedure that increases an employee salary by x%. Employee is identified by SSN and the percentage of increase is given as an input. 8. Implement a Package that contains the…Views in SQL are kind of virtual tables. A view also has rows and columns as they are in a real table in the database. We can create a view by selecting fields from one or more tables present in the database. A View can either have all the rows of a table or specific rows based on certain conditions. Under what circumstances would you create a View?SQL: Create a SQL query that uses an uncorrelated subquery and no joins to display the descriptions for products provided by a vendor in area code 615. Remember, the main difference between a correlated subquery and uncorrelated subquery is that, in a correlated subquery, the inner query is dependent upon the outer query, while, with an uncorrelated query, the inner query does not depend upon the outer query. Instead, it runs just once. You should NOT use union, minus, or intersect in this query. The outer query will use the PRODUCT table and the inner query will use the VENDOR table [hint: you should have 9 records of output]. My code: select p_descript from product where (select v_areacode from vendor where v_areacode = '615' ; I am getting this error, problem is I can't see what is missing any assistance is appreciated. ORA-00936: missing expression
- individual characters using their 0-based index. Hint: You will need to do this for checking all the rules. However, when you access a character .SQL A table Products have: a name (TEXT) a description (TEXT) a unit cost stored in cents (INTEGER) and of course we also add an id column to identify them. Separately, we'd like to track the number of items in stock for each product. To do so we'll have a store and an inventory table. Stores have just an id and a name. Then, our inventory table should combine stores and products, listing how much of each product each store has in stock. a product_id (INTEGER) a store_id (INTEGER) a quantity (INTEGER) in stock Now we can insert some stores, products and inventory into our database. There are 2 stores -- one called NY and one called NJ. There are 2 products we are concerned with. Their names are sneakers, costing $220 (remember this is dollars!) and boots costing $350. Use any description for each that you'd like. NY has 4 sneakers in stock and 3 boots. NJ has 5 sneakers in stock and no boots. Insert the above data into the tables you have created.Assignment Two: We will write three procedures on our tables, the first of which I have provided as an example. proclnsertPlayer takes one IN VARCHAR(16) paramater and returns an error code in the second SMALLINT (INOUT) parameter. The procedure checks the parameter and, if there are no errors, inserts the value into tblPlayers. Documentation of errors Condition Error code No errors 1st param Null or zero len playerID taken 1 proclnsertGame will receive two IN VARCHAR(16) interpreted as
- Problem Your task is to write an SQL query that uses SQL's time constants to dynamically determine the timezone the database server is configured to use. Your query should return the timezone as a single string value with the timezone offset relative to the Coordinated Universal Time (UTC). The single output column should be named tz_offset, and the value should be in the form: UTC: where and use two digits in 24-hour format, padded with leading zeroes if necessary. Example: if the server used India's timezone the output should be: | tz_offset | | UTC+05:30 (1 row) query.sql> init.sql 1Sales Database: Customers(custId, lastName, firstName, address, phone, creditLimit) Orders(ordNumber, itemNumber, qtyOrdered.) Items(itemNumber, itemName, price) For the Sales Database referenced above, write the SQL command to create the LineItem table, assuming the Orders table and items table already exist.Create a function create_tables that returns a connection to an in-memory SQLite database. This database should have a table employee having the following columns: • full name that cannot be null and is text • age that is an integer and can be null • rating that is float and cannot be null remarks that is text and can be null