Write a program to print the prime numbers from 500 to 700. The program should also print the count of prime numbers between 500 and 700. A number is called a prime number if it has exactly two positive divisors, 1 and the number itself. For example, the number 5 is prime as it has only two divisors: 1 and 5.

Answers

Answer 1

primes = 0

for x in range(500, 701):

   count = 1

   for w in range(2, x+1):

       if x % w == 0:

           count += 1

   if count < 3:

       print(x, end=" ")

       primes += 1

print("\nThere are {} prime numbers between 500 and 700".format(primes))

I hope this helps!


Related Questions

How do I charge my ACDC Halo bolt?

Answers

Answer:

To recharge your HALO Bolt, using the provided AC wall adapter cable, plug the AC adapter tip into the charger's charge input DC 20V/0.6A port. Next, connect the AC adapter into a wall outlet. Your HALO Bolt will automatically begin charging. Charge your HALO Bolt for a full eight hours.

Explanation:

if you make homemade knitted garments and you sell them to individuals online, what e-commerce are you participating in?
is it B2B or B2C or C2C or SaaS

Answers

The Answer Of This Question Is C2C.

20 pts, please write in JAVA. need this ASAP
In the Lesson Slides for this activity, we developed a method findChar for figuring out if a character was in a String.

The implementation was:

public boolean findChar(String string, String key)
{
for(int index = 0; index < string.length(); index++)
{
String character = string.substring(index,index+1);
if(character.equals(key))
{
return true;
}
}
return false;
}
However, there is a much more efficient and simple algorithm that we can use to determine if a character is in a String. Using the method signature public boolean findChar(String string, String key), figure out a more efficient method with a lower exection count.

Hint: We’ve learned a couple of methods that can tell us what index a character is at - can we use those to determine if the character is in a String?

Answers

public class JavaApplication78 {

   public boolean findChar(String string, String key){

       if (string.contains(key)){

           return true;

       }

      return false;

   }

   public static void main(String[] args) {

       JavaApplication78 java = new JavaApplication78();

       System.out.println(java.findChar("hello", "h"));

   }

   

}

First I created the findChar method using the contains method. It checks to see if a certain sequence of characters is in another string. We returned the result. In our main method, we had to create a new instance of our main class so we could call our findChar method.

identify 5 products/services needed by the people in our current situation.

Answers

Answers with Explanations:

5 Products/Services Needed by People These Days.

1. Face mask/Surgical mask - The use of face mask is considered a common sense. Most countries mandate people to wear this every time they go out.

2. Food Delivery service - To prevent contracting corona virus, most people prefer to have their food delivered than to dine out. This increases the demand for the food delivery service.

3. Alcohol - It has become an important habit recently to disinfect hands and other things. This is also being advertised on TV, thus many people carry it along with them.

4. Infrared Forehead Thermometer - Many establishments use this in order to quickly check the temperature of people entering.

5. Internet service - The increase use of this service is due to online learning and remote-working situations.

We all need different product and services. In this pandemic time, the products/services needed by the people are;

Face mask or Surgical mask

All round Food Delivery service  

Humanitarian gestures by people or firms and also Good Tv programs that are educative and one can watch with kids them.

Infrared Forehead Thermometer  

Internet service

A product is known to be a tangible goods that one buys or acquisition,  consume, etc.  Service is known as an intangible item.

A key reason for any new development is to give the best or new value to the customer and in this present time. Helping those who have lost their jobs, having mask mask,  etc., readily available will go a long way to help.

Learn more about Products from

https://brainly.com/question/10873737

Write pseudocode for a function that translates a telephone number with letters in it (such as 1-800-FLOWERS) into the actual phone number. Use the standard letters on a phone pad.

Answers

Answer:

Explanation:

Function telToNumbers with one parameter of a String input for the telephoneNumber

String var newTelephoneNum;

for loop through telephoneNumber {

Char var currentChar = current Character in the loop;

currentChar to lower Case;

Switch statement (currentChar) {

 case "a" or "b" or "c" : newTelephoneNum += "2"; break;

 case "d" or "e" or "f" : newTelephoneNum += "3"; break;

 case "g" or "h" or "i" : newTelephoneNum += "4"; break;

 case "j" or "k" or "l" : newTelephoneNum += "5"; break;

 case "m" or "n" or "o" : newTelephoneNum += "6"; break;

 case "p" or "q" or "r" or "s" : newTelephoneNum += "7"; break;

 case "t" or "u" or "v" : newTelephoneNum += "8"; break;

 case "w" or "x" or "y" or "z" : newTelephoneNum += "9"; break;

 default : newTelephoneNum += currentChar; break;

 }

}

print newTelephoneNum;

g You and your friend both send documents to the printer, but the printer can only print one document at a time. What does it do with the other document

Answers

Answer:

It places the document in a buffer

Explanation:

Since the printer can only print a document at a time, the other document is going to be placed in a buffer.

The print buffer can be described as a location in memory that has the function of holding data that is going to be sent to a computers printer. A print job such as in this scenario may remain in the buffer because another document is to be printed first.

Sometimes a document could be put in the buffer because the computer is waiting for the printer to respond. This is just another reason why documents are placed in a buffer.

________ help(s) prevent a hard drive from being a single point of failure. __________ help(s) prevent a server from being a single point of failure. _________ help(s) prevent a person from being a single point of failure.

Answers

Answer:

RAID, Failover clusters, Cross-training

Explanation:

RAID function by preventing a hard drive from being a single point of failure. It is called Redundant array of independent disks (RAID). Failover cluster duties is to prevent a server from being a single point of failure.requires at least 2 node

Create a new program with a struct, Data, that contains: an int a char[80] Write a function newData(char[]), that takes char[] as a parameter

Answers

Answer:

#include <iostream>

#include <cstring>

using namespace std;

struct Data {

   int userId;

   char name[80];

}

void newData(string data char[]){

   int counts= 0;

   struct Data name;

   data.userId = ++counts;

   data.name = char[];

   cout<< data.userId << "\n"<< data.name ;

}

int main( ) {

   char myName;

   string mydata;

   cin>> myName;

   cin>> mydata;

   newData( myName, mydata);

}

Explanation:

The c++ source code above stores its data in a struct called "Data". The function newData dynamically creates new data from the struct defined.

Write an expression that prints 'You must be rich!' if the variables young and famous are both True.
young = True
famous = False
if ''' Your solution goes here ''':
print('You must be rich!')
else:
print('There is always the lottery...')
Python 3 language

Answers

Answer:

Following are the expression to this question:

if (young and famous==True):

Explanation:

For print, the given expression the code requires some modification that can be defined as follows:

young = True#defining a bool variable that holds a value True

famous = True#defining a bool variable that holds a value True

if (young and famous==True):#defining if block that check variable value

   print('You must be rich!')#print message

else:#else block  

   print('There is always the lottery...')#print message

Output:

You must be rich!

Code explanation:

In the above-given code, two variable "young and famous" is declared, that hold a "True" which is a bool value, in this code, a conditional statement has used, that checks variable value, which can be defined as follows:

In the if block, it uses the above declared variable with and gate to check its value is equal to true. If the condition is true, it will print the true block message, otherwise, go to the else block in this, it will print the else block message.

Why would an information systems security practitioner want to see network traffic on both internal and external network traffic?

Answers

Answer:

To see who is accessing data and also where it is going

Explanation:

An information systems practitioner is a person who is involved in the planning and and also implementation of IT resources for any organization which he at she works.

The information systems practitioner would want to want to see network traffic on both internal and external network traffic so as to know who is accessing data and to also know where it is going.

Which input value causes the loop body to execute a 2nd time, thus outputting "In loop" again? { String s = "Go"; while ((!s.equals("q"))&& (!s.equals("")) System.out.println("In loop"); 5 - scnr.nextO;
a) "Quit"
b) "q" only
c) "Q only
d) Either "q" or "Q"

Answers

Answer:

a) "Quit"  

c) "Q only

Explanation:

Given

String s = "Go";

while ((!s.equals("q"))&& (!s.equals("")))  {

System.out.println("In loop");

s = scnr.next();

}

Required

What input causes another execution

Analyzing the while condition

while ((!s.equals("q"))&& (!s.equals("")))  

This can be split into:

!s.equals("q")) && (!s.equals(""))

Meaning

When s is not equal to "q" and when s is not an empty string

In other words,

the loop will be executed when user input is not "q" and user input is not empty.

So, from the list of given options: The loop both will be executed when:

a) Input is "Quit"

c) Input is Q only

Input of q will terminate the loop, hence b and d are incorrect

Write a method called rotate that moves the value at the front of a list of integers to the end of the list. For example, if a variable called list stores the values [8, 23, 19, 7, 45, 98, 102, 4], then the call of list.rotate(); should move the value 8 from the front of the list to the back of the list, changing the list to store [23, 19, 7, 45, 98, 102, 4, 8]. If the method is called for a list of 0 elements or 1 element, it should have no effect on the list. You may neither construct any new nodes to solve this problem nor change any of the data values stored in the nodes. You must solve the problem by rearranging the links of the list.

Answers

Answer:

Explanation:

public void rotate()

{

if(front == null)

return;

ListNode current = front;

ListNode firstNode = current;

while(current.next != null)

{

current = current.next;

}

current.next = front;

front = firstNode.next;

firstNode.next = null;

}

Write a Pandas program to import excel data (coalpublic2013.xlsx) into a dataframe and draw a bar plot where each bar will represent one of the top 10 production.

Answers

Answer:

import pandas as pd

import numpy as np

import matplotlib.pyplot as plt

df = pd.read_excel('coalpublic2013.xlsx')

sorted_by_production = df.sort_values(['Production'], ascending=False).head(10)

sorted_by_production['Production'].head(10).plot(kind="bar")

plt.show()

Explanation:

The python program plot a bar chart of the top ten productions in the excel worksheet. The excel file is read in as a pandas dataframe, sorted in descending order and the first ten of the dataframe is plotted as a bar plot.

Sometimes young adults may want to experience physical intimacy, and their lack of knowledge may result in .

Answers

Answer:

Unexpected outcome: Sometimes young adults may want to experience physical intimacy, and their lack of knowledge may result in pregnancy. ... Parents may experience emotions of frustration and anger when they have to deal with a cranky or troublesome child.

Given two integer variables distance and speed, write an expression that divides distance by speed using floating point arithmetic, i.e. a fractional result should be produced.
1. Calculate the average (as a double) of the values contained in the integer variables num1, num2, num3 and assign that average to the double variable avg. Assume the variables num1, num2, and num3 have been declared and assigned values, and the variable avg declared.
Creating objects
2. Declare a reference variable of type File named myFile.
3. Declare a variable named myMenu suitable for holding references to Menu objects.
4. Suppose a reference variable of type File called myFile has already been declared. Create an object of type File with the initial file name input.dat and assign it to the reference variable myFile.
invoking methods

Answers

Answer:

Following are the solution to this question:

Explanation:

In this question, the result value which would be produced are as follows:

[tex]= \frac{distance}{(double) \ speed}[/tex]

In point 1:

The formula for the avg variable:

[tex]\to avg = \frac{(num_1 + num_2 + num_3)}{(double)\ 3};[/tex]

In point 2:

The variable for the file is:

File myFile;

In point 3:

The variable for the mymenu:

Menu myMenu;

In point 4:

myString = new String();

Define a function print_total_inches, with parameters num_feet and num_inches, that prints the total number of inches. Note: There are 12 inches in a foot.

Sample output with inputs: 5 8

Answers

I wrote my code in python 3.8:

def print_total_inches(num_feet, num_inches):

   return ((num_feet)*12) + num_inches

print("There are a total of {} inches".format(print_total_inches(5,8)))

I hope this helps!

PLzzzzzz help me!! I will mark brainiest to the one who answers it right!!
Answer it quickly!!

Write a pseudo code for an algorithm to center a title in a word processor.

Answers

Answer: abstract algebra

Explanation: start with the algorithm you are using, and phrase it using words that are easily transcribed into computer instructions.

Indent when you are enclosing instructions within a loop or a conditional clause. ...

Avoid words associated with a certain kind of computer language.

Answer:

(Answers may vary.)

Open the document using word processing software.

In the document, select the title that you want to center. The selected word is highlighted.

On the Menu bar, select the Format tab.

In the Format menu, select Paragraph.

The Paragraph dialog box opens with two sub tabs: Indents and Spacing, and Page and Line Breaks. The first tab is selected by default.

Adjust the indentation for the left and right side. Ensure that both sides are equal.

Preview the change at the bottom of the dialog box.

Click OK if correct, otherwise click Cancel to undo changes.

If you clicked OK, the title is now centered.

If you clicked Cancel, the title will remain as it is.

Explanation:

I took the unit activity

Type the correct answer in the box. Spell the word correctly.
Under which menu option of a word processing program does a star appear?
A star appears under the
menu of the word processing program.
Reset
Next

Answers

Answer:

"a callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question."

Explanation:

The correct answer in the box is as follows:

A star appears under the shapes menu of the word processing program.

What is the word processing program?

The word processing program may be characterized as a type of MS software that is significantly used to create, edit, save, and print documents on a computer. It permits a user to create documents that mimic the format and style of the original document along with diverse functions.

The Shapes menu in the word processing program has numerous shapes like rectangles, Ellipses, and Freehand polygons. There are some other numbers of other shapes such as arrows, speech balloons, various stars, and others are also included in this menu tool.

If a user wants to add any specific shape, he/she is allowed to click Insert, click Shapes, select a shape, and then click and drag to draw the shape. That specific shape is now inserted in the word processing documents.

Therefore, a star appears under the shapes menu of the word processing program.

To learn more about Word processing documents, refer to the link:

https://brainly.com/question/1596648

#SPJ7

The _______ within a story are the people and/or objects that the story is about

A. Timeline
B. Plot
C. Characters
D. Setting

Answers

Answer:

c

Explanation:

thats who the story and book is about

C characters lol :) it’s C

Write a program in Python to sum to numbers:

Urgently needed, please.

Answers

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

print("{} + {} = {}".format(num1,num2,num1+num2))

Variables num1 and num2 prompt the user for a number. The print function then displays the answer and equation.

How does a search engine use algorithms to provide search results?

by creating keywords and phrases
by recording and storing data for worldwide use
by retrieving and ranking relevant search results
by limiting the type of search terms that it will accept

Answers

Answer:

By retrieving and ranking relevant search results

Explanation:

A search engine use algorithms to provide search results by retrieving and ranking relevant search results. The correct option is c.

What is an algorithm?

When a user enters a search query into a search engine, all of the sites that are considered relevant are pulled from the index and ranked in a set of results using a hierarchical algorithm.

Each search engine uses a different set of algorithms to determine which results are the most pertinent. Through tags like HREF and SRC, they may detect new links on these pages, and they add such pages to their list of sites to index.

Then, based on the search phrases you entered, search engines utilize their algorithms to produce a prioritized list from their index of the pages you should be most interested in.

Therefore, the correct option is c. by retrieving and ranking relevant search results

To learn more about the algorithm, refer to the link:

https://brainly.com/question/13092388

#SPJ6

Which term describes a visual object such as a picture a table or text box

Answers

the correct answer is “caption”

Answer: caption

Explanation:

Edge 2020

how has the Internet of Things affected business​

Answers

Internet of Things devices can be connected to each other and controlled to improve efficiency,which in turn has direct effects on the productivity of the business. Hope this helps!

Answer:

Business equipment can be continually adjusted based on analysis of data

Explanation:

A P E X

Because all the IEEE WLAN features are isolated in the PHY and ____________ layers, practically any LAN application will run on a WLAN without any modification.

Answers

Answer:

MAC

Explanation:

MAC Layer is the acronym for Media Access Control Layer. This said Media Access Control Layer happens to be one of the two sublayers that comprises of the Data Link Layer of the OSI model. The Media Access Control layer is majorly responsible or in charge of moving various data packets to the Network Interface Card, and also from the Network Interface Card (NIC) across a particular shared channel. The Media Access Control sublayer and the logical link control sublayer together are what makes up the data link layer.

Write a script that inputs a line of plaintext and a distance value and outputs an encrypted text using a Caesar cipher.
The script should work for any printable characters. An example of the program input and output is shown below:
Enter a message: Hello world!
Enter the distance value: 4
Output: Lipps${svph%

Answers

Answer:

def encrypt_text(text,value):

   encoded = ""

   for i in range(len(text)):

       char = text[i]

       if (char.isupper()):

           encoded += chr"po"ord'po'char'pc' + value -65'pc' % 26 + 65'pc'

       else:

           encoded += chr'po'ord'po'char'pc' + value -97'pc' % 26 + 97'pc'

   return encoded

plaintext = input("Enter sentence of encrypt: ")

dist_value = int(input("Enter number: "))

encrypted = encrypt_text(plaintext, dist_value)

print(encrypted)

Explanation:

The python program above is a Ceasar cipher implementation. The encrypt_text function is defined to accept text input and a distance value, which is used to encrypt the plaintext.

The user can directly input text and the distance value from the prompt and get the encrypted text printed on the screen.

a rectangle is 12 cm long and 9 cm wide.Its perimeter is doubled when each of its sides is increased by a fixed length.what is the length?​

Answers

Answer:

length = 12 cm

breadth = 9 cm.

perimeter of rectangle = 2( l+b)

= 2(12+9) = 2(21) = 42cm.

New length = (12+x) cm

New breath = (9+x) cm

2(12+x+9+x) = 42×2

2(21+x) = 84

21+ x = 84/2

21+x = 42

x= 42-21= 21

x= 21.

Therefore, length = (12+x)cm

=( 12+21) cm = 33cm.

Explanation:

Firstly we have written the length and breadth of the rectangle.

And the perimeter of rectangle i.e. 2(l+b)

Then, as it is in question we have doubled the perimeter

And at last, we have got the value of x.

and by putting the value in the new length we will get our answer.

hope you have got your answer dear.

Write the definition of a function that takes as input three numbers. The function returns true if the floor of the product of the first two numbers equals the floor of the third number; otherwise it returns false. (Assume that the three numbers are of type double.) (4)

Answers

Answer:

Written in C++

bool checkfloor(double num1, double num2, double num3) {

   if(floor(num1 * num2) == floor(num3)){

       return true;

   }

   else {

       return false;

   }

}

Explanation:

The function written in C++

This line defines the function

bool checkfloor(double num1, double num2, double num3) {

The following if condition checks if the floor of num1 * num2 equals num3

   if(floor(num1 * num2) == floor(num3)){

       return true; It returns true, if yes

   }

   else {

       return false; It returns false, if otherwise

   }

}

See attachment for full program including the main

Someone help me for about how to avoid online scams please I need help no trolls

Answers

Answer:

1. (for emails) Block spam messages.

2. Look at who sent whatever it is and make sure it is the exact email for the brand.

3. If someone is putting a lot of emojis in a comment or somthing its fake.

4. Make sure to read the fine print.

5. Do not giveaway personal information like zip code, address, social security number.

Which statistical measurement tools should be
used to solve the problem? Check all of the boxes
that apply.
A coach wants to calculate the average test scores
of students who participate in the most popular
sport that the school offers.
mean
median
mode

Answers

Answer:

mean

mode

Explanation:

edg 2020

Answer:

MEAN

mode

Explanation:

Review how to write a for loop by choosing the output of this short program.

for counter in range(3):
print(counter * 2)

2
3
4


0
2
4


0
1
2


2
4
6

Answers

Answer:

The answer is 0 2 4. I hope this helps you out. Have a wonderful day and stay safe.

Explanation:

Answer: 0 2 4

Explanation: got it right on edgen

Other Questions
Plants have structures that help perform many physiological processes that are required for the plants survival. Which of the following statements correctly pairs a plants structure to its function?A plants leaves absorb water from the environment that can be used during the process of anaerobic respiration.A plants guard cells protect the plant from harsh environmental conditions, pests, and diseases that could harm the plant.A plants chloroplasts are responsible for producing the green pigment required to attract the pollinators necessary for fertilization.A plants stomata are responsible for allowing gases to exchange between the leaf and the environment during the process of photosynthesis. _________ and __________ are my best friends. Question 3 options: Him, her Them, us me, her He, she 2y-4=x. find the slope of the line Place ( ) symbols in this problem to make a true statement: 4 + 5 2 = 18 The atomic masses of 20Ne (90.48 percent), 21Ne (0.27 percent), and 22Ne (9.25 percent) are 19.9924356, 20.9938428, and 21.9913831 amu, respectively. Calculate the average atomic mass of neon. The percentages in parentheses denote the relative abundance Please help will mark brainliest Find the least common denominator of the following pair of fractions: 1/2 4/5. ASAP a. 7 b. 20 c. 30 d. 10 Locate the battle of Lexington and condord and bunker hill based on what you have learned about events that led up to the American revolution why do you think the early battles of war were located around Boston Imagine a digestive system where food entered the small intertwine directly without first going through the oral cavity and stomach. What would he the disadvantages of this type of digestive system? How did Bathsheba react when she realized that one man at the market was not looking at her? What is the equation of the line in the graph? What is it called when the president or other high official is removed from office? The ribosome-covered structure found in the cytoplasm of a cell is called the.Golgi apparatusBrough endoplasmic reticulumlysosomesmooth endoplasmic reticulum What does President Washington see as dangers to the success of a newly formed United States of America? Cite excerpts from the text to illustrate your point When an employer takes the time to explain a mistake you have made and provides suggestions for avoiding that same mistake in the future, the employer is offering _____.constructive criticismverbal warningdestructive criticismdiscipline A store loses twenty-five dollars a day over six days. How much money was lost in total over these six days PLS HELP I GIVE BRAINLIEST YOOOO HELP ME ASAP DUDED BY MIDNIGHT BROHow do you find the value of x please help me( Look at the picture provived) i will give the crown