Write a program that calculates the cost of a phone call. The user enters a positive integer that
indicates the length of the call. The first two minutes of a phone call cost a flat $1.50. Minutes 3 to 10
cost 50 cents each. Each minute after 10 costs 25 cents each.
For example:
How many minutes is the call?
13
A 13 minute call costs 6.25

MY CODE SO FAR:
import java.util.Scanner;
public class Third {
public static void main (String[]args) {
Scanner num = new Scanner (System.in);
System.out.println("Enter number of minutes");
int x = num.nextInt();


I have gotten this far but im not sure what the rest is and how I would create the code for adding minutes. I know it has to do with final but not sure where to start. Thanks.

Answers

Answer 1

Here's an example Python code that calculates the cost of a phone call based on the length of the call:

print("How many minutes is the call?")

call_length = int(input())

if call_length <= 2:

   cost = 1.50

elif call_length <= 10:

   cost = 1.50 + (call_length - 2) * 0.50

   cost = 1.50 + 8 * 0.50 + (call_length - 10) * 0.25

print("A", call_length, "minute call costs", round(cost, 2))

In this code, we first ask the user to enter the length of the call in minutes. We then use an if-elif-else statement to calculate the cost of the call based on the length. If the call is 2 minutes or less, the cost is a flat $1.50.

If the call is between 3 and 10 minutes, the cost is $1.50 plus 50 cents per minute after the first 2 minutes.

If the call is longer than 10 minutes, the cost is $1.50 plus $4.00 for the first 8 minutes, plus 25 cents per minute after the first 10 minutes.

We then use the round() function to round the cost to two decimal places and print the result.

Here's an example output for a 13-minute call:

How many minutes is the call?

13

A 13 minute call costs 6.25


Related Questions

Add pictures using the _______ tab.
a. insert
b. layout
c. home
d. design

Answers

A) insert
is the best answer out of the answers. Hope this helps! 

Regardless of whether you are using a Microsoft Word or PowerPoint, if you are planning to add pictures to your presentation or document, you should click on the (A) insert tab.

In Microsoft PowerPoint, you can click Pictures and choose the picture you’d like to add from your computer, and in Microsoft Word you do the same thing and get the same results. The layout tab is only available on Microsoft Word while the design and home tab are available in both.

How can public-key encryption be used to distribute a secret key?

Answers

If you encrypt the secret key with someone else's public key, then only that person can decrypt it with his private key. The encrypted content can be freely shared with anyone, however only the intended recipient can retrieve the secret key since he is the only one with the proper private key.

Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins baking. What web resource would be most helpful?
A) Customer service
B) User manual
C) Vendor bulletin board
D) Video tutorial

Answers

The right answer should be C) Vendor bulletin board.

Please Rate this answer and thank me if it helped. :)

Answer:

C) Vendor bulletin board

Explanation:

-Customer service refers to the assistance that helps users with questions or problems that they may have.

-User manual refers to a guide that products have that shows how to use them.

-Vendor bulletin board is a web forum created by the vendor in which users can post information, questions and opinions.

-Video tutorial is a video that teaches how to do something.

According to this, the web resource that would be most helpful for Maria to read comments and suggestions before she begins baking is the vendor bulletin board.

A(n) _________ allows users to communicate and share information between computers

Answers

Salutations!

A(n) _________ allows users to communicate and share information between computers

network allows users to communicate and share information between computers. Network is a design of getting connection through modem, router switch etc. 

Hope I helped.

Have a great day!

Answer:

network

Explanation:

A network refers to two or more computers that are connected to share data and resources like printers. The devices can be linked through cables, telephone lines, WiFi, among others. According to this definition, the answer is that a network allows users to communicate and share information between computers.

If you use a c++ key word as an identifier, your program will:

Answers

Should refuse to compile. Probably with a syntax error.

Salting techniques were used to create complex user ids!
a. True
b. False

Answers

That statement is true
Compared with other techniques, salting techniques will always resulted in stronger user passwords. Salting techniques will add a random string to the user entered a password and then hash the resulting string. So even though there are 2 users with the same password, the hash for each account will be different

Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be putting many miles on his vehicle. What’s the best transportation option for Jim?

Answers

The best transportation option for Jim would be to Lease the car.

One of the earliest uses of an electronic digital computer involved ________.

Answers

The uses of earliest electronic digital computer involved many things such as computing or even learning informations but the earliest of use as to why it is also built is to be able to determine and note the weather forecast in a specific place.

What are the risks of logging into a system routing as “root” or some other administrative identity?

Answers

"Root" in Linus is the the same as Administrator in Windows.
When you log into a system with identity "root" this means that you have administrative privileges (you are not simple user of the system and application). The risk is that as a "Root" you have the authority to make changes in the system and maybe harm the system if you don't know exactly what you are doing.

Which service is enabled on a cisco router by default that can reveal significant information about the router and potentially make it more vulnerable to attack?

Answers

CDP is the service that is enabled in a cisco router or all supported interfaces by default to send and receive CDP information. However, some interfaces, such as ATM interfaces, do not support CDP. It can also be diable on an interface that supports CDP.

An array created during the execution of a program is called a ____ array.

Answers

probably dynamic since it was created dynamically.

What can geographers map with remotely sensed data?

Answers

Geographers can map for example the topography of the earth's surface using aerial photographs taken from a plane flying on regular flight paths at known altitudes. A topographic map with regular contour intervals and also showing infrastructure like roads and buildings can be created from this. Also, the LIDAR system can show features not observable on the ground by 'seeing' into the subsurface and detecting buried escarpments, trenches etc. 

Java is an object-oriented programming language true or false

Answers

true





------------------------------------------
Final answer:

Java is an object-oriented programming language that utilizes classes and objects to encapsulate data and functions, supporting core concepts like inheritance and polymorphism.

Explanation:

True, Java is indeed an object-oriented programming language. It was designed to have as few implementation dependencies as possible, allowing developers to write code that runs anywhere Java is supported. Java is well-known for its portability across platforms, which is achieved through the Java Virtual Machine (JVM). As an object-oriented language, Java uses classes and objects to structure code, encapsulating data and operations on data within these constructs, and supports core concepts such as inheritance, polymorphism, and abstraction.

Undefined function 'symsum' for input arguments of type 'double'.

Answers

the correct form is whom is thsi

The mass percent of hydrogen in CH₄O is 12.5%.Mass percent is the mass of the element divided by the mass of the compound or solute.

What is the mass percent?

Mass percent is the mass of the element divided by the mass of the compound or solute.

Step 1: Calculate the mass of the compound.

mCH₄O = 1 mC + 4 mH + 1 mO = 1 (12.01 amu) + 4 (1.00 amu) + 1 (16.00 amu) = 32.01 amu

Step 2: Calculate the mass of hydrogen in the compound.

mH in mCH₄O = 4 mH = 4 (1.00 amu) = 4.00 amu

Step 3: Calculate the mass percent of hydrogen in the compound.

%H = (mH in mCH₄O / mCH₄O) × 100%

%H = 4.00 amu / 32.01 amu × 100% = 12.5%

The mass percent of hydrogen in CH₄O is 12.5%.

CO2 = 1.580 grams H2O = 0.592 grams Lookup the molar mass of each element in the compound Carbon = 12.0107 Hydrogen = 1.00794 Oxygen = 15.999 Calculate the molar mass of CH4O by adding the total masses of each element used. 12.0107 + 4 * 1.00794 + 15.999 = 32.04146 Now calculate how many moles of CH4O you have by dividing by the molar mass. m = 1.15 g / 32.04146 g/mole = 0.035891 mole Now figure out how many moles of carbon and hydrogen you have. Carbon = 0.035891 moles Hydrogen = 0.035891 moles *

Therefore, The mass percent of hydrogen in CH₄O is 12.5%.

Learn more about mass percent here:

https://brainly.com/question/5295222

#SPJ5

Jared does not update his computer’s system software. What threat does his computer face?
viruses
hackers
Trojan Horses
worms

Answers

the answer is not viruses it is actually hackers.

You can use this method to determine whether a file exists.

Answers

The File Class's Exist Method

What is the maximum number of different codes that can be represented in 2 bytes?

Answers

A two byte word has 16 bits, so there are 2^16 possible values.

Assume that name has been declared suitably for storing names (like "amy" , "fritz" and "moustafa") write some code that reads a value into name then prints the message "greetings, name! ! !" where name is replaced the value that was read into name. for example, if your code read in "hassan" it would print out "greetings, hassan! ! !". **please ignore the spaces between the exclamation marks( ! ! ! )**

Answers

name = "Bob"
# or you can prompt the user to enter their name:
# name = input("What's your name? ")

print("greetings," , name)

What would you enter at the command prompt on a linux system to display present working directory?

Answers

pwd





---------------------------------

a shrug is an example of

Answers

A shrug is an example of a non verbal expression that could mean the person does not know or has doubt but it depends on the context.

Final answer:

A shrug is a "non-verbal communication" gesture indicating uncertainty or indifference, involving the elevation of the scapulae and the trapezius muscles.

Explanation:

A shrug is an example of a non-verbal communication gesture that can convey a variety of messages such as uncertainty, indifference, or lack of knowledge about a particular subject. It is a symbolic action often learned through cultural contexts. Physical movement involves elevating the shoulders, which implicates specific muscles and joints, particularly the trapezius muscles and the scapulae (shoulder blades). When you shrug your shoulders, movements occur at the scapulae, such as elevation and sometimes slight upward rotation, depending upon the intensity of the shrug.

Alphabet for your reference: a b c d e f g h i j k l m n o p q r s t u v w x y z if the code for cat is ecv what is the code for dog

Answers

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
Cat = Ecv
C = E
A = C
T = V
Regular alphabet shift 2 to the right, so A = C and so forth
D = F
O = Q
G = I
Dog = Fqi

By comparing the letters in 'cat' and their coded form 'ecv,' we find a pattern of shifting each letter by +2 positions in the alphabet. Applying this pattern to 'dog,' we get 'fqi' as the coded form.

To decipher the code for 'dog,' let's analyze the code provided for 'cat' which is 'ecv.'

We’ll determine the pattern by comparing the letters:

'c' to 'e': 'c' is the 3rd letter, 'e' is the 5th letter. The difference is +2.'a' to 'c': 'a' is the 1st letter, 'c' is the 3rd letter. The difference is +2.'t' to 'v': 't' is the 20th letter, 'v' is the 22nd letter. The difference is +2.

The pattern is shifting each letter in 'cat' by +2 positions in the alphabet to get 'ecv.'

Now, apply the same pattern to 'dog':

'd' (4th letter) + 2 = 'f' (6th letter)'o' (15th letter) + 2 = 'q' (17th letter)'g' (7th letter) + 2 = 'i' (9th letter)

Therefore, the code for 'dog' is 'fqi.'

In the late 1950s, the most likely setting for computers was a(n) _____. home college classroom specialist government laboratory, e.g., a military lab art gallery

Answers

Final answer:

In the late 1950s, computers were mostly found in specialist government laboratories, major corporations, and universities. They were large, expensive mainframes until the introduction of more accessible minicomputers and personal computers in later decades.

Explanation:

In the late 1950s, the most likely setting for computers was a specialist government laboratory, such as a military lab. Early computers like the UNIVAC I and the IBM 701 were large mainframe computers used primarily by government agencies, large businesses, and universities due to their high costs and complex data management systems. It wasn't until the 1970s that minicomputers became somewhat more accessible and later, in the late 1970s and early 1980s, fully assembled personal computers started to appear in businesses and upper-middle-class homes.

A device that is connected to a network that is identified by a unique number and works as an individual part of the network is called a

Answers

cellular phone? I'm pretty sure

What three things must a motorist carry with them while driving a motor vehicle?

Answers

Three things motorists have to carry are:
A valid driver license
Permit
Provisional license
Insurance
and
vehicle registration cards

One way to make a data table stand out on the screen and help bring the viewer’s attention to it is to add a shadow behind the table. How can a PowerPoint user add a shadow to a table?

by choosing the Layout tab under Table Tools, clicking on Effects, and selecting Shadow
by choosing the Layout tab under Table Tools, clicking on Shading, and selecting Shadow
by choosing the Design tab under Table Tools, clicking on Effects, and selecting Shadow
by choosing the Design tab under Table Tools, clicking on Shading, and selecting Shadow

Answers

A user can add a shadow to a table on Power Point presentation, by choosing the Layout tab under Table Tools, clicking on Effects, and selecting Shadow. The shadow can be inner, outer or perspective. The most commonly used is outer shadow.
Adding a shadow behind the table will make the data table to stand out on the screen and help bring the viewer’s attention.
Shades can be added also on text, tables, pictures inserted in the presentation and other object. 

Answer:

a

Explanation:

Using ______, a smartphone can connect to an automobile audio/control system

Answers

Using bluetooth, a smartphone can connect to an automobile audio/control system

In project integration management, project ______ and _______ are intertwined and inseparable activities

Answers

Final answer:

In project integration management, project "planning" and "execution" are closely linked and must be managed together. Project managers must cohesively integrate planning, execution, and other processes with the knowledge areas to achieve success.

Explanation:

In project integration management, project planning and execution are intertwined and inseparable activities. These integrations emphasize the importance of a cohesive project environment where planning and executing the project are conducted in such a way that each process influences the other. Project managers must apply their unique skill set, incorporating various processes, including initiation, monitoring and controlling, and closing, aligning with all nine project management knowledge areas to meet the desired goals.

Effective integration management ensures that all elements of the project are properly coordinated, from the scope to the timeline and quality standards, resulting in successful project outcomes. Additionally, aspects like cost, time, communication, human resources, and procurement are vital components that a project manager must also synthesize into a harmonious entirety, often requiring a dynamic and flexible approach to address each project's unique challenges and risks.

Your motherboard supports dual channeling and you currently have two slots used in channel a on the board; each module holds 1 gb. you want to install an additional 1 gb of ram. will your system run faster if you install two 512 mb dimms or one 1 gb dimm? explain your answer.

Answers

The system will run faster if you install two DIMMs because dual channeling can be used if both Channel B slots are filled. Dual channeling is faster than single channeling.

If the motherboard of a computer supports dual channel and have two slots, then The system will run faster if you install two DIMMs because dual channeling can be used if both Channel B slots.

what is computer ?

Computers is the device which are used in many sectors like banking, medicine, finance and education and especially the growth and application of  artificial intelligence by using computers can blur the distance between man and machine.

computer can store and processes the  information electronically and come in different option, sizes and grades of functionalities.

Computer systems consist of two parts such as hardware and software. The hardware is an electronic circuit which helps to compute the mathematical computations, and the software.

Software can be operated by hardware which is the second part  further subdivided into two parts, the operating systems and applications programs where the operating system runs the computer hardware.

For more details regarding computer, visit

brainly.com/question/21474169

#SPJ2

What do authors use to point out important information?

A.Complex vocabulary
B.Figurative language
C.Introduction paragraphs
D.Key phrases

Answers

The answer is D key phrases
Your answer will be D key phrases that's because when you use Key phrases your pointing information people can use to make summaries or answer questions.

In windows vista, which process allows you to display two documents side by side?

Answers

By dragging one tab the the top right corner and holding for a few seconds it will automatically take up a certain proportion of the screen. By doing the same to the left side, the documents will be side by side and ready to multi-task with ease. This process is called "splitting screens".
You need to drag one tap to the corner and It will automatically split the screen.

Hope this helps :)
Other Questions
If the FDA or USDA has determined that an additive was safe for us in a certain food before the 1958 Food Additives Amendment was passed, its known as aA. color additiveB. GRASC. prior-sanctioned substance D. indirect additive Mr Grant needs 30 pieces of felt. He can buy them in packs of 10 or as single pieces. What are the different ways Mr Grant can buy felt? did the egyptians developed the worlds first stone megastructure before the stonehenge which element of art would this tool help an artist to understand?A. lineB. shape C. color D. space Andy has 23 coins made up of quarters and half dollars, and their total value is $7.75. how many quarters does he have In which instances would the nurse feel comfortable providing care without first obtaining informed consent? select all that apply? Explain how the structure of lipids determines the polarity of the molecule Differentiate y=(6x)/(1-cot(x)) Psychologists need to decide how they will the phenomenon they are interested in so that they can describe that phenomenon Which of the following definition best describes flashback? How does the system of checks and balances in the federal government work? Most windows computers typically use _____, which supports much larger hard drives and files than the older fat32 and includes better security and error-recovery capabilities. the conclusion paragraph has two jobs. what are they? Identify the transformation that maps the figure onto itself. which decimal is least in value0.511 0.57 0.453 0.582 Match the vocabulary term with the number.*Hint: You completed this in Lesson 2.09 today.Most short stories share the same characteristics, or 1.____blank. One is 2.____blank, which means the series of events that take place in the story. Another is 3.____blank, which refers to the time and place in which the action takes place. Then there are 4.____blank, the people or animals that the story is about. Another characteristic is 5.____blank, which is the authors attitude towards the characters or subject. The 6.____blank is the wisdom that can be taken from the story, and 7.____blank is the perspective from which the story is told. Taken together, one can accurately understand the authors 8.____blank in writing the story. point of viewelementscharacterspurposetonethemesettingplot1.____________________2.____________________3.____________________4.____________________5.____________________6.____________________7.____________________8.____________________ One photoshop charges $0.36 per print. Another photoshop charges $2.52 plus $0.08 per print. Juan finds that the cost of printing his photos is the same at either shop. How many photos does Juan have to print? "what is the probability of finding an electron within one bohr radius of the nucleus" Explain how both science and technology must have been involved in the development of leg prosthesis Felicity put down 800 on a used car. She took out a loan to pay off the balance of the cost of the car. Her monthly payment will be 175. After 9 months how much will she have paid for the car? Steam Workshop Downloader