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
Gemima's classmate Tristan sent her an Excel table that shows the amount of vitamin C in seafood. She wants to
Kipish [7]
Answer: Link and use destination styles

Explanation: First copy the table on Excel you want to include in Word, now go to your Word document and press Ctrl + V to paste the contents into the Word file. In order to link, you have to click on the Paste Options button at the bottom right and choose either Match Destination Table Style and Link to Excel or Keep Source Formatting and Link to Excel.
7 0
3 years ago
Read 2 more answers
Luckas entered the date 9-17-2013 in an Excel workbook. He wants the date to appears as “Tuesday, September 17, 2013.” Instead o
irakobra [83]

Explanation:

highlight, correct format and click ok

3 0
3 years ago
Examine the following function header, then write a statement that calls the function, passing 12 as an argument. def show_value
klemol [59]

Based on the name of the function, it seems that we're supposed to only print the value of quantity to the console.

def show_value(quantity):

   print(quantity)

show_value(12)

The first line of code creates the function, the second line of code prints the value of quantity to the console, and the last line of code calls our show_value function with 12 as our argument. I wrote my code in python 3.8. I hope this helps.

8 0
3 years ago
1.Give single word
EastWind [94]

Answer:

A. Versatile

B. Accuracy

C. High speed

D. Animation.

5 0
3 years ago
Is a wireless keyboard jack an interconnector?
Leto [7]
Yes a wireless keyboard jack is an interconnecter
6 0
4 years ago
Read 2 more answers
Other questions:
  • Which windows tool is used to determine if a dynamic disk is corrupted?
    6·1 answer
  • What is active server page ?or why is it important?
    9·1 answer
  • A fast food chain that wants to inform consumers about its latest dollar menu item will most likely use ___ to do so. ____ may i
    7·2 answers
  • After adding an image to her flyer, Danica played around to see which layout would look the best. At one point, her text was on
    8·2 answers
  • A technician configures a switch with these commands:SwitchA(config)# interface vlan 1 SwitchA(config-if)# ip address 192.168.1.
    8·1 answer
  • The declarations and statements that compose the method definition are called the __________.
    9·1 answer
  • Think of some local businesses that have websites. Look online and identify two different websites for businesses or services in
    13·1 answer
  • Game Design!
    10·2 answers
  • When creating a user generated function, what procedure is followed?
    9·1 answer
  • Which of the examples is part client side code
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!