Write a script that calculates the common factors of 10 and 20. To find a common factor, you can use the modulo operator (%) to check whether a number can be evenly divided into both numbers. Then, this script should print lines that display the common factors like this: Common factors of 10 and 20: 1 2 5
Q: In this task, you have to calculate the interquartile range (IQR) and the median values of CO2…
A: The solution to the given problem is given below: 1) Solution to TASK 1 * pandas library is for…
Q: import random import math Which of the following will assign a random integer from 30 to 90,…
A: In Python, Both random.randint(start, end) and random.randrange(start, end) is used to get a random…
Q: What will be the value in EAX after the following lines execute? mov eax, FFFFFFFFH neg ax O…
A: Firstly we are moving FFFFFFFF into eax register
Q: HAVE YOU EVER HEARD OF 'CROSSING THE BRIDGE NOODLE'? LET ME TELL YOU - IT WAS A VERY DIFFERENT KIND…
A: Algorithm: There are multiple test cases. Each case starts with an integer N , the number of Po's…
Q: a nfa for L = {w ∈ {a, b}∗|w begins and ends with different letters.}
A: NDFA, for a particular input symbol, the machine can move to any combination of the states in the…
Q: What does the following display? System. out.println("Sum of the 1st 4 numbera: 8 + 4); Nothing…
A: The given problem is to identify the output of the given statement. The system is related to the…
Q: I want to keep asking the user “what letter grade they got” until they type in the correct letter…
A: The comment shows the corrected part in the code
Q: Write a PHP program which iterates the integers from 1 to 10. You will need to create and declare a…
A: The Answer start from step-2.
Q: Create a script file that will prompt the user for his choice, read in the choice, and use the…
A: We need to write a shell script for the given scenario.
Q: Which of the following is a correct comment?
A: This question is answered on the basis of Java. Please find the answer below.
Q: Based on electric tariff below, you are required to write a problem analysis, draw a flowchart, and…
A: Here we draw simple flow chart: ================================== Figure 1:
Q: Explain the following line of code using your own words: 'txtText.text
A: A code in a programming language is a set of rules or set of instructions that communicate and use…
Q: Which one of the following is a keyword
A: keyword in C++ : Keywords are those words whose meaning is already defined by Compiler. These…
Q: If you know that the Tax office takes a tax for the imported goods according to their degrees as…
A: Find Your Code Below
Q: Please rewrite the following expression using LaTeX formatting: 5 (square root 3x) + 2x^2 – (3x/2)
A: Given expression: 5 (square root 3x) + 2x^2 – (3x/2) We can rewrite this expression in the LATEX…
Q: Hi, when someone gets the answer incorrect, instead of giving them a new question I want them to try…
A: import java.util.Random; //to generate random numberimport java.util.Scanner; //To get user input…
Q: Select all the values that are taken as false in Javascript: O a. 0.0 O b. w O c. "undefined" O d.…
A: Given:
Q: Write a simple program to display the credit card privilege according to type of credit card. The…
A: start input character then check switch statement case and print statement according to it stop
Q: A local company has asked you to develop several javascript functions for them to sell to their…
A: Answer:- WeightConverter.html <!DOCTYPE html> <html> <head> <title>Weight…
Q: You have a group of friends coming to visit for your high school reunion, and you want to take them…
A: Note: Below is the required program in python. Programming Approach: Taking the requirements for…
Q: There are unlimited numbers of 1c, 5c, 25c, 50c Pick 48 coins to have 1 dollar Identify 2…
A: Should there be a possibility for alteration: The coin changeover challenge is analogous to that…
Q: A group of characters put together to create text is called a string. Group of answer choices True…
A: Answer :- True
Q: Using a javascript Find out the number of years required for an investment to grow to a desired…
A: PROGRAM EXPLANATION: Start. Create an Html page. Inside the Html page define the script tag to…
Q: # Write your code here using python manu = EPL_Team('Manchester United', 'Glory Glory Man United')…
A: So the class will have instance variables to store the name, song and number of titles and EPL_Team…
Q: Write a php program using else_if / switch statement to accept the code and display the message. The…
A: Given:
Q: Write a script called calcMassHollowSphere.m that prompts the user to enter the inside diameter,…
A: Task : Write the MATLAB script to input inside diameter , outside diameter and density of sphere.…
Q: Q1: There are different rules in different countries to create car license plates. For example:- In…
A: There are total of 26 alphabets and 10 numbers and to select a alphabet we can do that in 26 ways…
Q: ! If you know that the Tax office takes a tax for the imported goods according to their degrees as…
A: Given : To write a python program to print new price using the given tax table.
Q: What is the value of the postfix expressions below? A=1, B=2, C=3< d=4 a. AB+C b. ABC**ABC++-
A: Process to evaluate post fix expression: starting reading input: step1) if current input is a…
Q: Using Javascript and HTML: Write a script that calculates the product of the odd integers from 1 to…
A: <!DOCTYPE html><html><head><title>calculation the product of the odd…
Q: For the square matrix M of numerical values, Write a script that ask the user to enter value from…
A: here have to determine about count no if time value found in matrix.
Q: HAVE YOU EVER HEARD OF 'CROSSING THE BRIDGE NOODLE'? LET ME TELL YOU - IT WAS A VERY DIFFERENT KIND…
A: Question Details: There are multiple test cases. Each case starts with an integer N , the number of…
Q: You are manger of one hotel, write a shell script to accept room rent and number of days then…
A: Algorithm: Start Read rent,nod Calculate total= rent*nod Display total Stop
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: Make a School Fee Calculator using formula and Function in Excel. Provide your formula on the blank…
A: Let's fill up the Black blank cells, for the 4th year The following are the fields that has to be…
Q: Which of the following lines, if any, contains a valid, though not necessarily accurate/helpful,…
A: ANSWER:
Q: Q5) what are the values will be printed by the following? 1. For i As Integer = 4 To 15 If (i Mod 2…
A: According to the guidelines we are allowed to answer only the first question. The question…
Q: Labwork #2 Q1. For this PHP exercise, write a script using the following variables: $x=80; Sy=20;…
A: To print statement in php, echo is used To concatenate message use dot operator.
Q: Prompt the user for three employees names which will randomly assign the employee to either the…
A: import random library import scanner library to take input from user create a class create a random…
Q: Calculate the wages of an employee by engaging the user with the input command to enter their hourly…
A: Below is the required code in MATLAB to calculate the wages of an employee:
Q: One way to determine how healthy a person is, is by measuring the body fat of the person. The…
A: Body fat of the person: The best way to determine how a person is healthy is by calculating the body…
Q: If you define x = 2/3, and then type format rat, how will the value of x be displayed? x =…
A: Format rat(rational) contains numerator and denominator form which is a rational number format.
Q: Write a python program which displays a simple menu as follows: Python ISBN Conversion Menu Verify…
A: def main(): menu() def menu(): print('1. Verify the check digit of an ISBN-10')…
Q: Given an integer variable timer, write a statement that uses the decrement operator to decrease the…
A: Answer is : timer--; Eg, class Prog{ public static void main (String[] args){…
Q: A Web site validates a 16-digit ID number based on the following rules - 1. Starting with the…
A: Given_ID=58667936100244id=Given_ID if( (not isinstance(id,int)) ): print("Must enter 16-Digit ID…
Q: Write a script that uses two variables to store (1) the count of all of the products in the Products…
A: Write a script that uses two variables to store (1) the count of all of the products in the Products…
Write a script that calculates the common factors of 10 and 20. To find a common factor, you can use the modulo operator (%) to check whether a number can be evenly divided into both numbers. Then, this script should print lines that display the common factors like this:
Common factors of 10 and 20:
1
2
5
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- Jeff and Gern run a furniture company specializing in tables and chairs. To save time, when a new order comes in, a special shorthand is used to describe the order. The rules for their shorthand are as follows • The first character is "T" for a set of tables, or "C" for a set of chairs. If the order includes both tables and chairs, the order shorthand begins with "TC" • Next they indicate the number of tables or chairs for the order. If the order includes both tables and chairs, they'll write the number of table first, then the number of chairs, separated by a dash. An order comes in for three standard tables constructed using Oakwood. What would the order shorthand be for this order?SmartCare Surgery is a private clinic which is operating in the Sultanate of Oman since 2015. The company have three types of users, Doctors, Nurses, and patients. The clinic needs a program to validate the user’s identifiers. Valid users’ identifiers are ten (10) characters long, starting with two (2) uppercase letters. Here are some examples of valid users’ identifiers. DR8361541 NR4356787 PT2345678 Write an algorithm that will: take a potential user’s identifier from the user. if the input is “X”, allow the user to quit the program. if the potential user identifier is too short, then tell the user. if the first two characters do not follow the rules, then tell the user. allow the user to keep entering user’s identifiers.! 1000$ by default, but discounts are applied to it based on different criteria. 1- Students get 20% discount. 2- People who purchase in 30 days in advance get 25% discount. 3- student purchasing 40 days in advance gets a 40% discount. This code segment calculates the final price. x = Text1.Text If x= "student" Then 1-... ElseIf x= "advance" Then price 1000 - 0.25 * 1000 ElseIf x= "stu_adv" Then price 1000 - 0.4 * 1000 2-...... price = 1000 3-..... 4-.. O = 1-price = 1000 - 0.2 * 1000 2-Else 3- End If 4-Print price 1-price 1000 - 0.2 * 1000 2-Else 3- Print price 4-End If 1-price = 3-End If 4-Print price = 1000 -0.2 * 1000 2-Elseif
- 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.Please read the question first and than only answer if you can. I will flag your answer if you will provide a wrong code.Enter three values of angles and then print "Triangle" or "Not a triangle" depending on whether these three angles can form a triangle or not. In addition, if it is a right angle triangle then print "Right-Angle Triangle" or "Non Right-Angle Triangle".
- In java eclipse ide Given a number which is the measurement of a distance in millimeter. Change the representation of this number to the format: x meters y centimeters and z millimeters. For example, if the number is 12345 millimeters, display the message: “12345 millimeters = 12 meters 34 centimeters and 5 millimeters”. (Clue: use “/”and “%” operators to do conversion)1# Write a program that allows users to choose from one of three shapes: Squares, Circles or (right) Triangles. Allow the user to use the first letter of the shape (S, C, T) to specify what they want. After the shape is selected, ask the user for the appropriate data to calculate the shape's area, and then and print that area value to the screen for them. Area formulas you can use: Triangle: % base x height Square: length x length Circle: % Pl x radius? Notes: The floating-point data type will be your friend here. Round your area answer so that no more than 2 decimal places are shown when printing on the screen. You can use 3.1415 for Pl; Think about this as a CONSTANT in your code. For this part and especially part (b) below, think about componentizing your code. So one gigantic main() is not a best practice and not what we want to see here. Remember what we discussed about "procedural decomposition" and functions last week!Body Mass Index is a simple calculation using a person's height and weight. The formula is BMI = kg/m2 where kg is a person's weight in kilograms and m2 is their height in meters squared. Calculate a persons Body Mass index using their weight in pounds. This means you must first convert pounds to kilograms (kg) then apply the formula above. In converting pounds to kg, 1 pound = 0.453592 kg. So to convert pounds to kg, either multiply the pound value by 0.45359237 or divide by 2.2046226218. Then you must convert their height in inches to meters. The length in meters is equal to the inches multiplied by 0.0254. Write a program that accepts a users height as an integer in inches and their weight in pounds. Convert those inputs to their metric equivalents outlined above and determine their body mass index. Display what the conversions from and to their metric equivalents are. Display the body mass index and the category it belongs to.
- Calculate income tax for the given income by following the below rules: Total Income Rate (in %) First 10,000 AZN 0 Next 10,000 AZN 10 The remaining 20 Expected Output: 4 For example, suppose the total income of the user is 45000 AZN. In this case income tax payable is: 10000*0% + 10000*10% + 25000*20% = 6000 AZN. Do not forget to use comment tag in order to explain each line.Problem: An online grocery store sells items on a web page. A user adds items to a basket and he clicks on the submit button when he completes. The store sells food and electronic items. The electronic items require VAT payment of 15 percentage of their prices. There are packed and lose food. The lose food is measured in weights. User specifies the weight amount or the quantity in his selection of items depending on its type. The price is computed as the product of the price per item or the price per weight and the weight or quantity are given by the user. Write an application that reads a user basket list and produces the bill receipt. Check the given samples of input/output in the figures below. The bill receipt contains the list of item details in decreasing order according to the price computed for each item. Use the selection sort' to sort the items in the list and do not use java given sort method. Selection sort is an algorithm used to arrange elements in a list. It selects the…"A gym assigns all patrons a membership ID number that consists of eight alphanumeric characters. The first character could be any capital letter, A through Z; the second and third characters must be 0, 1, or 2; the fourth character could be any capital letter, A through Z; and the rest of the characters can be any digit excpet 0. Digits and letters can be repeated.
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)