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
In Python, arrays are usually reserved for
Katen [24]
It would be the first one! Hope this helps have a great day
5 0
3 years ago
What is a good analogy for explaining the actions of a compiler?
kozerog [31]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

This question is about what is a good analogy for explaining the actions of a compiler?  The correct option is <u> automatic programming of kitchen devices .</u>

<u> </u>

a hybrid ability of a car to use multiple energy sources  (false)

this analogy is not correctly mapped on the compiler, becuase the compiler can be designed only for one type of language, for example, the program that calculates the average of students number can be easily programmed in C++ and in C#. But you cannot compile the C# program in C++ compiler and vice versa.  

a street map of a local subdivision  (false)

Because you can design a compiler for a not specific subdivision of programming.

an interpreter who speaks several languages

it is not an analogy, however, an interpreter can handle only one type of language.

an automatic programming of kitchen devices (true)

This is a good analogy of compiler because you give input to the device and that device based on your input gives you back an output. Similarly, you give input to the compiler in form of language syntax, and it automatically give you output based on your input.

3 0
4 years ago
Determine the efficiency and big-O notation for the following algorithm:
Anon25 [30]

Answer and Explanation:

To calculate Big O, go through each line of code and determine O(!), O(n) and return your calculation.

For example,

In O (5 +6n), where 6 5 represent five instances of O(1), and 6 represent the 6 O(n).

We compute the time complexity of the algorithm. We get the result, just an estimation. In given algorithms, run time in milliseconds has been provided, such as in T (1) algorithm process in 512 milliseconds and T(2) algorithms process 8129 milliseconds. But big O notation not measured in milliseconds. Information given is not enough to calculate the big O notation.

       

8 0
4 years ago
Match each item with a statement below. a.Authentication b.Brute force attack c.Dictionary attack d.Password e.Shoulder surfing
Lana71 [14]

The steps that ensure that the individual is who he or she claims to be

a. Authentication  

Authentication is a process that provides proof that the user is genuine and not an imposter. It is a way to prove that you are allowed to access a system. Usernames and Passwords have been the default method of authentication. These days though, passwords are not the only authentication mechanism.

A password attack in which every possible combination of letters, numbers, and characters is used to match passwords in a stolen password file

b. Brute force attack  

An automated brute force attack involves repetitive successive attempts of password guesses by using a trial and error approach and hoping to guess the encryption correctly. It is an old attack method, but is still in effect and popular with hackers. It can take minutes to crack or an eternity. Using automated brute force attacks tools and programs, and attacker is able to enter parameters such as password length, character set, pattern, language, and skips for the type of password to be generated

A password attack that compares common dictionary words against those in a stolen password file.

c. Dictionary attack  

A dictionary attack is another common offline password attack that begins with the attacker creating encrypted versions of common dictionary words and then compares these words against those in a stolen password file. This is sometimes very successful because users create passwords that are simple English dictionary words. A variation of such an attack is the hybrid attack.

A secret combination of letters, numbers, and/or symbols that serves to authenticate a user by what he or she knows.

d. Password  

Nowadays, when accessing almost any computer device, systems, or a website, we are typically required to provide information that identifies and proves that we are actually that person. This is done by the use of passwords. Despite passwords being the primary means of authentication, they are no longer considered to be a strong defense against attackers.

Viewing information that is entered by another person

e. Shoulder surfing  

An example of shoulder surfing is observing someone entering a code from a keypad while standing from a short distance. Another good example is a hotel room’s cipher lock. Cipher locks are vulnerable to shoulder surfing. Someone passing by from behind is able to see the buttons being pushed and can easily gain access when you leave.

Grouping individuals and organizations into clusters based on an affiliation  

f. Social networking and not social engineering

The definition above is for social networking and not social engineering. Social networking sites are responsible for facilitating individuals with common interests and beliefs and operates and functions as an online community of users. Anyone on social media is able to read information posted by others. Thus, social networking carries with it cyber risks like personal data being used maliciously.

Redirecting a user to a fictitious website based on a misspelling of the URL  

g. Typo squatting

Also known as URL hijacking, Typosquatting is a questionable type of cybersquatting that targets internet users who type a web address incorrectly. It is the extreme version and similar to phishing. When users make such errors, they may be lead to another alternative site owned by a hacker.

Phishing attack in which the attacker calls the victim on the telephone

h. Vishing  

Instead of using emails or other forms of communication to contact the potential victim, a simple phone call can be used. Known as voice phishing, an attacker calls an unsuspecting victim and pretends to be someone working with the victim’s bank. The attacker lies to the user that his or her credit card has experienced fraudulent activity, instructs the victim to call a specific number and hangs up. Upon calling back, the victim is instructed by automated instructions telling them to enter credit card numbers and other essential details.

A phishing attack that targets wealthy individuals  

i. Whaling

Whaling is a type of spear phishing where instead of targeting the small fish, it targets the “bigger fish” or the wealthy individuals who have larger sums of money in a bank account. By putting every effort on this group, the attacker can invest more time in the attack and achieve major success.

6 0
3 years ago
What is the relationship between interrupt and buffer <br>​
Jlenok [28]

Answer:

Operating systems have some code called an 'interrupt handler', which prioritises the interrupts and saves them in a queue. Buffers are used in computers as a temporary memory area, and they are essential in modern computers because hardware devices operate at much slower speeds than the processor.

8 0
2 years ago
Other questions:
  • A(n) _____ of an class is where the services or behaviors of the class is defined. (Points : 6) operation
    6·1 answer
  • Manny has created more than one hundred bookmarks. When he looks at the menu, he has to scroll through a very long list of bookm
    15·1 answer
  • Explain why living things store energy in lipids instead of in carbohydrates
    5·1 answer
  • What computer device works like a central nervous system?
    11·1 answer
  • Why did my typing suddenly become delayed, but then went back to normal a few minutes later. Is this spyware or smth?
    6·1 answer
  • What should you do in order to have access to the header and footer tools? Open the View tab. Open the Page Setup dialog box. Op
    6·1 answer
  • Choose the answer that best completes the
    8·2 answers
  • What can be changed when a style is modified?
    5·2 answers
  • Pls answer dis question when i'm not connected and i open bluestacks 5 it will be working but if i am connected it wil not work
    14·1 answer
  • 14. My computer “boots-up” (aka activates and starts running) but it tells me that it cannot find the data to start the operatin
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!