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
Jobisdone [24]
3 years ago
6

Write a program that prompts the user for an integer and thenprints out all prime numbers up to that integer. For example,when t

he user enters 20, the program should print out:
2
3
5
7
11
13
17
19
Note: A prime number is not divisible by any number except 1and itself.
Computers and Technology
1 answer:
MaRussiya [10]3 years ago
8 0

Answer:

n=int(input("Enter number upto which you want to print prime numbers:\n"))#taking input of n in integer type..

for i in range(1,n): #looping over 1 to n.

   pr=True  #taking pr to be True..

   for div in range(2,i): #looping over 2 to i..

       if i%div==0:#if i is divisible by div then it is not prime

           pr=False#making pr false

   if pr and i!=1: #condition for printing

       print(str(i))#printing the prime numbers..

       

Explanation:

In the python program we have checked for every integer up to n that is is not divisible by any integer between 2 to n-1 both inclusive if it is then it is not a prime number.

You might be interested in
Add the following numbers in abacus 2436+9214​
bazaltina [42]

Answer:

the answer is - 11,650

Explanation:

you study abacus too ?

4 0
3 years ago
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject afte
lidiya [134]

Answer:

<em>The </em><em>answer </em><em>is </em><em>(</em><em>A)</em>

Explanation:

Double-click both the worksheet tabs one at a time and then enter the new names.

6 0
3 years ago
A ___________ organizes related commands together, under a tab.
notsponge [240]
A menu bar organizes related commands together, under a tab.
So the answer is <span>b. menu bar</span>
8 0
4 years ago
A company develops a gaming application that it intends to sell. One of the scenarios that the sales team is concerned about is
Deffense [45]

Answer:

A. Registration technique

7 0
4 years ago
An administrator needs to set up an authentication server for users connecting to a network through a VPN. What kind of server c
nalin [4]

Answer:

RADIUS

Explanation:

RADIUS is the networking protocol that is used for the purpose of authentication to access the network resources. The full form of RADIUS is Remote Authentication Dial In User Service. It is used by different organizations, which setup their own network that can be accessible through VPN, DSL or modems through different networks. The purpose of this protocol is to establish the security and authentication mechanism by organization itself.

So, If an administrator needs to set up an authentication server for users connecting to a network through a VPN, he should establsih the RADIUS based Server.

3 0
4 years ago
Other questions:
  • Which of the following can you NOT apply for at any FLHSMV office? A. Certificate of title B. License plates C. Vehicle registra
    15·2 answers
  • You work in a customer call center. Martin is on the phone asking about the difference between solid-state drives (SSDs), hybrid
    6·1 answer
  • Which increases the rate of soil formation?
    10·1 answer
  • What characters cannot be used in a filename?
    15·1 answer
  • Write a program that prompts the user to enter the center and a point on the circle. The program should then output the circle’s
    9·1 answer
  • Two routers connect with a serial link, each using its S0/0/0 interface. The link is currently working using PPP. The network en
    6·1 answer
  • Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
    9·2 answers
  • ____ occurs when two nodes simultaneously check a channel, determine that it is free, and begin to transmit.
    9·1 answer
  • What games do you play?<br><br><br> Be sure not to report any answers!
    5·1 answer
  • Are there any apps in the App Store that allow people to ask a question about any topic and have skilled professionals answer it
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!