1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Talja [164]
3 years ago
6

Write a program in Python to input Principle Amount, Rate, Time and a choice

Computers and Technology
1 answer:
AfilCa [17]3 years ago
3 0

Answer:

P = float(input("Principal Amount: "))

R = float(input("Rate: "))

T = float(input("Time: "))

option = int(input("1 for Simple Interest, 2 for Compound interest: "))

if option == 1:

    Interest = (P * R * T)/100

    print("Interest: "+str(Interest))

elif option == 2:

    Interest = P * (1 + R/100)**t

    print("Interest: "+str(Interest))

else:

    print("Invalid Selection")

Explanation:

The next three line prompt user for Principal Amount, Rate and Time

<em>P = float(input("Principal Amount: "))</em>

<em>R = float(input("Rate: "))</em>

<em>T = float(input("Time: "))</em>

<em>This line prompts user for option (1 for Simple Interest, 2 for Compound interest)</em>

option = int(input("1 for Simple Interest, 2 for Compound interest: "))

If option is 1, simple interest is calculated

<em>if option == 1:</em>

<em>     Interest = (P * R * T)/100</em>

<em>     print("Interest: "+str(Interest))</em>

If option is 2, compound interest is calculated

<em>elif option == 2:</em>

<em>     Interest = P * (1 + R/100)**t</em>

<em>     print("Interest: "+str(Interest))</em>

If option is neither 1 nor 2, Invalid Selection is printed

<em>else:</em>

<em>     print("Invalid Selection")</em>

You might be interested in
....is an act of introducing an invention into market on business basis for profit​
jonny [76]

Answer:

Entrepreneurship

Explanation:

6 0
3 years ago
Advertising managers work on websites used in __________?
Elena-2011 [213]
Campaigns

Hope this is right :-;
3 0
3 years ago
Read 2 more answers
How do you loop a makebeat in earsketch
Anettt [7]

Answer:

i dont know if this help but To do this, we will use a 'for loop'. The “for loop” allows the programmer to call a section of code repeatedly within a range of values. The range() function will return integer values depending on the arguments.

Explanation:

5 0
3 years ago
Describe the need for switching and define a switch. List the three traditional switching methods. Which are the most common tod
nirvana33 [79]

Network switching is an essential aspect of computer networking. Interconnecting multiple devices can sometimes cause issues in a network. The idea of network switching comes in when we want to offer practical solutions to these issues. Data coming into an input port (ingress) and data leaving out (egress) to its final destination are always achieved through network switching. A switched network must have a switch that acts as the medium through which data passes to its final destination. It can connect your computers, servers, and printers, creating a way to share resources.

The three main traditional switching techniques are circuit switching, message switching, and packet switching. However, the most common models used today are circuit switching and packet switching. They are used to connect communicating devices together within an enterprise network. Let us learn a little bit more about them. The similarities between these two are very generic. They both would probably require the destination address of the device you are sending the packets to. However, there are several distinct differences between them.

Circuit switching is connection-oriented while packet-switching technology is connectionless. The former is set up as a dedicated communication channel that is established before the sender and recipient can start to communicate. Data on the latter is fragmented into packets routed independently by network devices. The message in Circuit switching is received in the same way it was sent, while message sent as packets in Packet switching is received out of order and assembled upon arriving in its destination.

Inside a Switch’s hardware architecture is a TSI (Time-slot interchange) which is a known technology that uses time-division switching technology with the help of (TDM) time-division multiplexing. It has RAM that comes with several other memory locations and has input and output ports that uses the RAM to fill up with data that comes in through its input terminal. Its mechanism deals with how data comes in through input ports, stored and read out in RAM in sequences, and then sent out through output ports. We will discuss these ports down below

The four components are:

Input Ports – As discussed above, the input ports deal with how data comes in and how it is presented in the physical and data link layers of the OSI

Output Ports – It does the opposite of the functions of an input port

Routing protocol – In the network layer of the OSI, the routing protocol performs the functions of the table lookup. Decisions on the best path are made for network packets .

Switching Fabric – In packet switching, there are input and output line cards that are connected by a switch fabric. Most processing in switching fabrics is done in line cards.

8 0
4 years ago
if a hacker wants to exploit the TCP three-way handshake, what is the most effective way to go about it?
goldfiish [28.3K]

The most effective way to exploit TCP three-way handshake is TCP SYN flood.

  • SYN flood attack is simply a kind of computer attack that begins with 3-way TCP handshake.
  • TCP SYN flood is also called SYN flood and it is a type of distributed Denial of Service (DDoS) attack that uses every part of the normal TCP three-way handshake to eat up resources on the known server and render it non-functional
  • With TCP SYN flood, a hacker can eat up resources of target's computer and makes it unresponsive.

From the above, we can therefore say that the most effective way to exploit TCP three-way handshake is TCP SYN flood.

Learn more from:

brainly.com/question/14739766

7 0
2 years ago
Other questions:
  • Which of the following is not true about managing your privacy settings? (select all that apply)
    9·2 answers
  • Edmund wants to visit his university's website. Which software application would he use?
    14·1 answer
  • Explain why computer users should use the cloud?
    14·1 answer
  • After a worksheet has been displayed in page layout view, page breaks are indicated by ________ in normal view.
    14·1 answer
  • Georgenotfound??? question mark??
    15·2 answers
  • As you move through your professional career, you will receive requests for favors and contributions. You will not be able to ho
    5·1 answer
  • Sorry but, what are brainliest for?
    7·2 answers
  • Name the default Package of java<br>​
    8·2 answers
  • Please Complete in Java a. Create a class named Book that has 5 fields variables: a stock number, author, title, price, and numb
    10·1 answer
  • Marcus traded in his 10-year-old truck for a new one. Because it is the first new truck he
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!