3. Write a line of code to calculate the new sales price by multiplying the original price by the discount and subtracting the product from the original price. Store the value in a variable named final_price
Q: Write Swift code to do the following: Show your code and a screen shot of your output. Ask the…
A: logic: read temperature. use if else and match condition , then display message. syntax for if…
Q: Bank Muscat sends the monthly transaction report to all its customers through email. When the…
A: PSEUDO CODE: START //Promoting the user to enter the ID WRITE “Enter a valid…
Q: Write the following 3 assignments: • Write an assignment statement that assigns the int literal…
A: Required: Write an assignment statement that assigns the int literal 16741656 to a variable named…
Q: Question#4 Which of the following variable names are valid , and which are invalid? 1. Age 2.…
A: A variable name can start with the alphabet, and underscore only.
Q: Which of the following identifier/variable name is considered as valid? Select one: a. x_1 b. all…
A: The answer for the above given questions is given below:
Q: the student is requested to form 4 different expressions. Each expression must have the following…
A: In this question we have create four different expressions and solve them. All the definitions of…
Q: Write a line of code that asks the user to Enter the original retail price , and stores the value…
A: The escape sequence for making text bold is '\033[1m'
Q: 1.)Which of the following identifier/variable name is considered as invalid? Select one: a. none of…
A: 1) rules for constructing variables Alphabets, numbers, and underscores can all be used in a…
Q: ng which data directive, a signed integer variabl
A: Required: When using which data directive, a signed integer variable with an 8-bit value is…
Q: Which of the following identifier/variable name is considered as invalid? Select one: a. none of…
A: let us see the answer:-
Q: 1.)Which of the following identifier/variable name is considered as valid? Select one: a. x_1 b.…
A: 1) a) x_1 is correct answer. A letter (lower or upper case) or an underscore must be the first…
Q: 8.1 LAB: Creating passwords (1) Prompt the user to enter two words and a number, storing each into…
A: PROGRAM CODE: color = input("Enter favorite color:\n")pet = input("Enter pet's name:\n")number =…
Q: 1. If C and F are the Celsius and Fahrenheit temperature respectively, the formula for conversion…
A: Note: The script has been provided in python.
Q: Create 4 different expressions. Every expression
A: ⦁ In order to satisfy each and every condition for every single expression, the values are to be…
Q: QUESTION 3 Which of the following statement is false regarding the assignment statement? O a. The…
A: Answer: (a) choice a is correct. (b) choice b is correct. (c) Choice c is correct. (d) Choice d is…
Q: question below using the information provided. The first column of the hidden range is the name the…
A: Here we discussed about vlookup , what is this perform in ms excels:…
Q: Describe what and how many values below variable is storing the values? int list[100];.
A: Programs are used to perform specific tasks, the task may be simple such as calculating the addition…
Q: Which symbol is used to initialise a variable? O init O O O O
A: Symbol Means = to initialize a variable == Equal to => Greater than or equal to init it…
Q: Which of the criteria affects whether the intNum variable's value is less than 0 or higher than…
A: Which of the criteria affects whether the intNum variable's value is less than 0 or higher than…
Q: What is the correct code to calculate and display the remaining amount after deducting 2.5% discount…
A: Note: As per policy we are entitled to answer 1 question at a time. In the above question option, a…
Q: If you reject H0 when H0 is correct, what type of error is this? Question 15 options: a Type I…
A: Hyроthesis testing is аn асt in stаtistiсs whereby аn аnаlyst tests аn аssumрtiоn…
Q: Design an Applet function to display the net amount depending on the option selection by the user…
A: I am writing a code supposing that using array is efficient. which will give you a efficiency of…
Q: Which of the following identifier/variable name is considered as valid? Select one: a. 1st_name b.…
A: Rules for constructing variables Alphabets, numbers, and underscores can all be used in a variable.…
Q: Create two variables named fruit1, fruit2. Assign the value apple to fruit1 and pear to fruit2.
A: The initialization of two or more variables can be assigned in a single line in python This works…
Q: 1. Evaluate the expressions For each of these expressions, indicate the value and type of each:…
A: NOTE: - Since the programming language is not mentioned, the below explanation is in C++. Order of…
Q: Which of the following PHP statement/statements will store 111 in variable num? i) int $num =…
A: Here is the solution which is mentioned below:
Q: B.Question The BITI Students Club is offering a new travelling package or membership. People can…
A: This question requires understanding of C++ and program flow First we must understand the flow of…
Q: Based on the statement below, what will be the result? Int age = 10; Select one: O a age stores only…
A: 1. B - Age will have a value of 10 Int age = 10; In this answer is B age will have a value of 10…
Q: X is integer value based on your the last TWO(2) digit Matric Card number. If the value X is ODD,…
A: #include<stdio.h>int main(){ int x; printf("Enter the value of x: "); scanf("%d",&x);…
Q: 1) Create a variable, myage, and store your age in it. Subtract one from the value of the variable.…
A: Start myage<-Enter your age myage<-myage-1 myage<-myage+2 Display myage End
Q: 1. You have to save each contact based on their telecom operator. If there is no contact of a…
A: Here, Code instruction is given.
Q: If the decPay variable contains the number 1200.76, which of the following statements displays the…
A: Below are some standard numeric format specifiers. 1. "C" : It is a format specifier for currency…
Q: Question No: 01 02123nt505 This is a subjective question, hence you have to write your answer in the…
A:
Q: /* 04: create a variable called dbl and set it equal to 99.956 Output the variable */
A: Note - As you haven't specified particular programming language to write code in, I have written…
Q: Write a series of if statements that will evaluate your grade contained within a variable called…
A: Since Programming language is not mentioned i have used python for solution Code
Q: Which notation is used to express the following mathematical expression? + + 2 6 + - 13 2 4 What…
A: Which notation is used to express the following mathematical expression? + + 2 6 + - 13 2 4 What is…
Q: Which statement will display The price is 4.99 Assume a variable called price stores the value 4.99.…
A: print statement is used to display output. Syntax to display message with value in variable. print…
Q: 7. How would you declare a variable storing a person's name? String name = Jeff; String name =…
A: Answers of the problem is given below. in step 2 A declaration of flexibility in a computer…
Q: Which of the following variable declarations are correct? If a variable declaration is not correct,…
A: To find whether the given variable declaration is correct or not. The given variable declaration…
Q: Which of the following statements places input into the variable "value"? a) value >> cin; b) cin >>…
A: The cin object in C++ is an object of class istream. It is used to accept the input from the…
Q: Which statement will display The price is 10.47 (Assume a variable called total stores the value…
A: Given, Choices: print(The total price is 10.47) print('The total price is total price')…
Q: Select the appropriate relational operator on the right-hand side to fill in the blank so that it…
A: The given relational operator are as follows: 1. = : equals to operator This operator returns true…
Q: Which statement will display The price is 4.99 Assume a variable called price stores the value…
A: Given, Choices: print(The price is 4.99) print("The price is" , price) print('The price is…
Q: Which of the following statements is false? The following assignment statement adds the values…
A: Actually, the answer has given below;
Q: From the following options, what is the correct way of declaring a variable? i.…
A: A variable can not start with a number, so a is not true. other are correct
Q: 1. Declare a variable named title. 2. Assign title the value "President". 3. Initialize a variable…
A: Note: Programming Language not specified declaring and assigning values and variables using C++…
Q: 1) Request a float number user input, price, from the console. 2) Print "Price Matches" if the…
A: PROGRAM STRUCTURE: Include the required header files. Start the definition of the main function.…
Q: QUESTION 10 You should use comments to define the purpose of a particular variable. True False
A: Answer is given below .
Q: Assume that variable ??? is an integer variable which is assigned a random value from zero (0) to…
A: As we can see that we need to make the number 3 and 13 valid element, so it can be done in various…
Q: 20. What is the value of the variable called total? y = 2 total (x-y)*2 120m
A: PEMDAS rule is one of the rules which is exactly equal to BODMAS rule. The full form of PEMDAS is…
3. Write a line of code to calculate the new sales price by multiplying the original price by the discount and subtracting the product from the original price. Store the value in a variable named final_price
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- You have been hired by PetPals Veterinary Clinic to modify its Bill Calculator application. Upon reviewing the application, you notice that all of the controls have their default names. You also notice that the Calculate button’s code uses the properties of controls in the calculation statements. The total amount a customer owes for all of the services performed during an office visit may contain a decimal place. What data type is best for a variable that will store this value? a. String b. Double c. Integer d. Fractioncomment : True / False ?For the code below can you varify the card number, card exp date, card cvv and address for example the card number should be 13 numbers if any more it should say "invalid" for the card exp date it should be like 12/35 if not then its invalid for card cvv it should only be 3 numbers and address should be like 11-11-11st as long as it has the "-" and "st" also when ever its invalid can you make it print on the bottom of the box like the example in the image below. thank you <!DOCTYPE html> <html> <head> <style> input { height: 25px; border-radius: 5px; } </style> <script> function validate() { if (!validateVal(document.getElementById("number").value)) { alert("Please Enter the number"); return; } var num = parseInt(document.getElementById("number").value); if (num < 1 || num > 9) { alert("Enter a number between 1 and 9(Including 1 and 9)"); return; } if (!validateVal(document.getElementById("name").value)) {…
- Professor Zak allows students to drop the four lowest scores on the ten 100-point quizzes she gives during the semester. Design an application that accepts a student name and 10 quiz scores. Output the student's name and 10 quiz scores. Output the student's name and total points for the student's six highest-scoring quizzes. Modify the application so that the student's mean and median scores on the six best quizzes are displayed.Swapping the value of two variable always requires a temp variable. True False1- You are required to draw flow chart and write a Pseudocode for the following draw flowchartproblem statement.Muscat MobiCare is a Mobile Outlet, which provides Mobile repair services. The charges of mobilerepairs are based on the type of the service.Details of charges are as follow:Software Fault: 4 OMRScreen Fault: 6 OMRNetwork/Wi-Fi Fault: 8 OMRInternal Hardware Fault: 10 OMRThe Outlet offers discount to the loyal customers. The discount is offered based on the customervisits to the outlet.Following is the detail of discounts.1- Customer visiting 4 times a year gets 20% discount.2- Customer visiting 6 times a year gets 30% discount.3- Customer visiting 8 times a year gets 50% discount.You are required to draw a Flow Chart diagram and write a Pseudocode for a computer programthat takes customer name, mobile model, visit date, total number of visits, and required service(mentioned above). The program outputs a receipt with all the entered information plus repaircharges based on the…
- A game program contains the following code to update three score variables, health, food, and knowledge. The maximum values for the three variables are 100, 80, and 25, respectively. The game program’s author would like to write a procedure that could be used to update any variable in the game (myScore) that has a maximum value (myLimit) by a given amount (myAmount). A correct call of the procedure is shown below. Which of the following is a correct implementation of updateScore ? 4 answer options in picture below, full question in other picTrue or False 5. The name gross_pay is written in the camelCase convention.Slappy’s Software Sales AssignmentYou have been hired by Slappy’s Software Sales to write a program to figure thetotal cost to customers that order Slappy’s software packages.Discounts are given based on the number of units sold:Number of Units Sold Discount Amount1 – 9 None10 – 19 20%20 – 49 30%50 – 99 40%100 or more 50%Create a form similar to this:The three boxes are labels. Remember to use the Auto Size and Border Styleproperties.The program should read the number of units sold and figure a base cost. Theunits cost $99 each. A discount should then be figured and subtracted from thebase cost. The subtotal, discount amount and total cost should be displayed, ascurrency, in the appropriate labels.Here are some screen shots of the running program:Set the tab order and access keys.Put comments in your program as to what each section is doing.Use constants for the discount rates and base price.
- Evaluate the following postfix expression: 10 5 + 2 * 3 3 / %The user should be able to test different monthly deposit amounts, interest rates, and lengths oftime to see how increases and decreases impact their investment growth.4. Your code will need to account for the following:a. Month: The number of months based on user input in the “Number of Years” fieldb. Opening Amount: The initial investment amount as well as the opening balance eachmonth, which includes interestc. Deposited Amount: The dollar amount the user plans to deposit each month. This valuewill be the same every month for the duration of the investment.d. Total: The sum of the opening and deposited amountse. Interest: Money earned based on the “annual interest” rate input by the user. Theinterest based on an opening amount of $1 and a deposited amount of $50 with aninterest rate of 5% compounded monthly is:(Opening Amount + Deposited Amount) * ((Interest Rate/100)/12)OR(1 + 50) * ((5/100)/12)Note: Dividing by 100 converts the interest rate percentage to a decimal.Note: 12 is the…the variable price_per_pencil is assigned the price of a pencil. Write a statement that calculates the price of 12 pencils and assigns the result to a variable named price_per_dozen