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
iren2701 [21]
3 years ago
14

WHERE DO I GO TO DO THIS AND WHAT DO I WRITE?????

Computers and Technology
2 answers:
faust18 [17]3 years ago
8 0

You can just look up "python ide online" on google and paste this code:

n = -1

count = 0

while n < 0:

   n = int(input("We're checking to see if a number is prime or not! Enter a positive number: "))

if n % 2 == 0:

   if n == 2:

       print("{} is a prime number".format(n))

   else:

       print("{} is not a prime number".format(n))

else:

   for x in range(n, 1, -1):

       if n % x == 0:

           count += 1

   if count > 1 or n == 1:

       print("{} is not a prime number".format(n))

   else:

       print("{} is a prime number".format(n))

I've written some code that checks to see if a number entered by the user is a prime number or not.

Sorry, but I'm not too good with pseudocode plans and all that. I hope this helps.

Anton [14]3 years ago
8 0

Answer:

import math

print("Let's solve ax² + bx + c = 0")

a = int(float(input('Enter a value for a: ')))

b = int(float(input('Enter a value for b: ')))

c = int(float(input('Enter a value for c: ')))

D = b*b-4*a*c

if (D<0):

   print("Sorry, this equation has no solutions.")

elif (a == 0):

   if (b == 0):

       if (c == 0):

           print("Every value of x is a solution")

       else:

           print("Sorry, this equation has no solutions")

   else:

       x = -c/b

   print("The one solution is x={:.3g}".format(x))

elif (D==0):

   x = (-b + math.sqrt(D)) / (2*a)

   print("The one solution is x={:.3g}".format(x))

else:

   x1 = (-b + math.sqrt(D)) / (2*a)

   x2 = (-b - math.sqrt(D)) / (2*a)

   print("This equation has two solutions: x={:.3g} or x={:.3g}".format(x1, x2))

Explanation:

Above is another little program to use the quadratic formula.

You might be interested in
Nevermind- I figured it out.
posledela

Answer:

I'm sorry if I wasn't here to help you, but I'm glad you solved it ;)

Explanation:

3 0
3 years ago
Define a function dice(n) that returns the sum of a random roll of n 6-sided dice. Example output in photo. Thank you
leonid [27]

Answer:

code (in python) is in the explanation

Explanation:

import random

def dice(n):

   count = 1

   t = list()

   while count <= n:

       i = random.randint(1,6)

       t.append(i)

       count += 1

   print(sum(t))

Hope this helps!

6 0
3 years ago
PLEASE HELP!!! <br> Why are Blackberry phones good?
Aleks [24]
The Key2 has excellent build quality, thoughtful software additions and a keyboard that purists will adore. ... Battery life is above average and it runs much faster than the KeyOne, but the BlackBerry Key2 is very much a phone for a select few people who still must have a keyboard – and no one else.
4 0
3 years ago
You already know how to use lists. What is the index of 5 in the following list? [2, 3, 5, 1, 6]
ASHA 777 [7]

Answer:

1

Explanation:

5 0
3 years ago
Read 2 more answers
How can an antivirus protect your device​
Igoryamba
Antivirus software protects your device from viruses that can destroy your data, slow down or crash your device, or allow spammers to send email through your account. Antivirus protection scans your files and your incoming email for viruses, and then deletes anything malicious
3 0
2 years ago
Read 2 more answers
Other questions:
  • Linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    14·1 answer
  • Why aren't the answers visible anymore? Thanks!
    8·2 answers
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    13·2 answers
  • WILL GIVE BRAINLIEST! An ________________ is a list of steps needed to answer a problem or finish a task. When the code is execu
    14·2 answers
  • A proactive computer professional will _____. have a neutral outlook toward technology underestimate the impact of technology an
    13·2 answers
  • Your it department enforces the use of 128-bit encryption on all company transmissions. your department also protects the compan
    13·1 answer
  • Create one Python module: arithmetic which has two functions: add(x, y) and get_length(x). The description of two functions are
    7·1 answer
  • Please help me
    7·2 answers
  • Commercial technical data and commercial software:_________.
    11·1 answer
  • When you get a new sim card do it come with a new number or do you have a activate the phone and get a new number in store ?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!