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
olchik [2.2K]
3 years ago
10

Can you please make a simple python program? I will give you 20 points and branliest if it is good! It must include:

Computers and Technology
2 answers:
svetoff [14.1K]3 years ago
4 0

Answer:

# Newton's Law of Universal Gravitation

import math

print("This program will calculate the gravitational force between two objects")

# Gravitational Constant

G = 6.67408

while True:

   try:

       m1 = float(input("\nInput mass of first object (in kilograms): "))

       break

   except ValueError:

       print("Invalid input!")

while True:

   try:

       m2 = float(input("Input mass of second object (in kilograms): "))

       break

   except ValueError:

       print("Invalid input!")

while True:

   try:

       d = float(input("Distance between the objects (in meters): "))

       break

   except ValueError:

       print("Invalid input!")

force = G * (m1 * m2) / math.pow(d, 2)

print("The gravitational force between these two objects is {0} newtons!".format(force))

alekssr [168]3 years ago
3 0

Answer:

# Solve the quadratic equation ax**2 + bx + c = 0

# import complex math module

import cmath

a = 1

b = 5

c = 6

# calculate the discriminant

d = (b**2) - (4*a*c)

# find two solutions

sol1 = (-b-cmath.sqrt(d))/(2*a)

sol2 = (-b+cmath.sqrt(d))/(2*a)

print('The solution are {0} and {1}'.format(sol1,sol2))

Hope This Helps!!!

You might be interested in
Which CIDR network has the smallest possible number of hosts? a. 123.0.0.0/8 b. 123.45.0.0/16 c. 123.45.67.0/24 d. All have the
Lina20 [59]

Answer:

CIDR is based on a variable-length subnet masking technique, which allows a new method of representation for IP addresses. Routing prefix is written with a suffix number of bits of the name, such as 123.0.0.0/8, as the CIDR network has the smallest possible amount of hosts.

Explanation:

CIDR ( Class Inter-Domain Routing ) It is a method that is allocating IP addresses and routing the IP. CIDR is introduced in 1933 and replace the architecture of network design on the internet. CIDR slows down the growth of the routing across the web and helps to slow the IP addresses such as IPv4 addresses.

CIDR consists of two groups of bits in the address. In the new age, the network prefix identifies the whole network. This is used as the basis of routing between IP networks and allocation policies.

IPv4 in-network prefix is 8-bit groups.

A typical IPv4 address is 192.168.0.5 the lowest value is 0, and the highest value is 255

In the given choices, 123.0.0.0 / 8 of the possible smallest number of hosts.

8 0
3 years ago
Explain<br> the three types of periodic<br>maintanance. .​
LenaWriter [7]

Answer:

poop i think

Explanation:

6 0
3 years ago
Consider the following instructions for a game element: Move Forward If not at end, move forward Else stop This is an example of
xz_007 [3.2K]

Answer:

C.

Explanation:

8 0
3 years ago
a. Fill in the blanks with suitable words: A software that controls and manages all the activities of the computer ... b. A soft
zavuch27 [327]

Explanation:

i don't know

4 0
3 years ago
How is an amp meter connected in a circuit to measure flow of electrons
Leno4ka [110]
R=0 of the amp meter so it can be placed in the circuit
7 0
3 years ago
Read 2 more answers
Other questions:
  • The tone a writer takes is referred to as the writing _____.
    7·2 answers
  • What’s a sign you should talk to an adult about your online time
    14·2 answers
  • . If you have written the following source code:
    9·1 answer
  • An organization is assigned a Class-C network 200.120.80.0 and wants to form subnets for its threedepartments: D1 (60hosts), D2
    7·1 answer
  • Match each term to the appropriate definition. DBMS data mining hash file index key field locking protocol relation roll back sc
    10·1 answer
  • When searching for an image on your computer, you should look for a file with which of the following extensions?
    8·1 answer
  • categorize each job role as an administrative job or management job auditor director legal secretary payroll clerk etc ​
    8·1 answer
  • ---------------is a systematic review of a person’swork and achievements over a recent period, usually leading toplans for the f
    11·1 answer
  • how does a demilitarized zone (dmz) work. A.By preventing a private network from sending malicious traffic to external networks
    10·1 answer
  • Michelle has defined a custom object by creating an object literal. She wants to access the properties of the custom object. Mic
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!