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
Alinara [238K]
2 years ago
15

Write a program that asks the user to enter two integer numbers X and Y. The program halves each number between X and Y then pri

nts the values on the screen. For example: If X=5 and Y=7, the program prints the following values 5/2=2.5, 6/2=3.0 and 7/2=3.5 Sample run 1: Enter X and Y: 5 7 2.5 3 3.5 Sample run 2: Enter X and Y: 15 10 5.0 5.5 6.0 6.5 7.0 7.5

Computers and Technology
1 answer:
QveST [7]2 years ago
5 0

Answer:

`I wrote a quick script in Python, to get you started a little basic and doesn't cover much but it works

Explanation:

starting off x = input(...) and y = input(...) is simply grabbing the input from the users then I make a base array vals defined like:

vals = []

to store the calculated results

rx = int(x) and ry = int(y), are simply converting the x, y which are strings into a int type, so I can use them on this line:

for i in range(rx, (ry + 1)):

I added the + 1 to ry because the range ends at the number before Y, example:

for i in range(5, 8):

 print(i) -> 5,6,7

with all of that I simply ran an iteration <em>for loop</em> and calculated and store the results into vals presented here:

vals.append(i / 2)

If there's any confusion leave a comment I'll try my best to help out

You might be interested in
1. Why was the Internet created?
lana [24]

Answer:

1. The internet is any set of computer network that communicates using standardized protocols.The Internet was first invented for military purposes, and then expanded to the purpose of communication among scientists

2.ARPANET was the network that became the basis for the Internet. Based on a concept first published in 1967, ARPANET was developed under the direction of the U.S. Advanced Research Projects Agency (ARPA). In 1969, the idea became a modest reality with the interconnection of four university computers.

3.The first permanent ARPANET link was established on 21 November 1969, between the IMP at UCLA and the IMP at the Stanford Research Institute.

4. Vinton Grey Cerf born june 23rd 1943 in New Haven Connecticut is considered to be the father of internet.

5.Mosaic is a converged platform, which offers data engineering, advanced analytics, knowledge-led automation, IoT connectivity and improved solution experience to its users. Mosaic enables organizations to undertake quantum leaps in business transformation, and brings an insights-driven approach to decision-making. It helps deliver pioneering Analytics solutions at the intersection of physical and digital worlds.

6. client/server network. A computer network in which one centralized, powerful computer (called the server) is a hub to which many less powerful personal computers or workstations (called clients) are connected. The clients run programs and access data that are stored on the server

7.An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. An IP address serves two main functions: host or network interface identification and location addressing.

8.A Vlog is is a video blog post. You can think of it as an online journal or diary, while A blog is purely text based.

9. The main difference between podcast and webcast is live streaming. Webcasting is essentially broadcasting over the Internet, using online streaming to deliver content. Podcasts are delivered via the Internet but are not streamed.

10.Electronic mail (email or e-mail) is a method of exchanging messages ("mail") between people. Email should be used because it safe and secure.

11. Some of the email etiquette are: Do have a clear subject line. Don't forget your signature.Do use a professional salutation. Don't use humor. Do proofread your message. Don't assume the recipient knows what you are talking about..Do reply to all emails.

12.Text messaging, or simply "texting," is a cellular phone service typically limited to 160 characters, whereas instant messaging isusually a computer session with a longermessage size. ... Both text messaging andinstant messaging are often called just plain "messaging."

13.Voice over Internet Protocol (VoIP), also called IP telephony, is a method and group of technologies for the delivery of voice communications and multimediasessions over Internet Protocol (IP) networks, such as the Internet. The terms Internet telephony, broadband telephony, and broadband phone servicespecifically refer to the provisioning of communications services (voice, fax, SMS, voice-messaging) over the public Internet, rather than via the public switched telephone network (PSTN), also known as plain old telephone service (POTS).

14.Ecommerce, also known as electronic commerce or internet commerce, refers to the buying and selling of goods or services using the internet, and the transfer of money and data to execute these transactions.

15.The B2B, B2C,C2C are types of ecommerce business models.

The B2B business model is one which facilitates business transaction from one company to another example an engineering manufacturing company sells equipment to a construction company

B2C:It is a business model in which a retailer sells directly to a consumer

C2C: It is a business model in which a consumer sells to another consumer through a platform or in-person.

16. Social ecommerce and mcommerce have different meanings, though both aim at making customers' lives easier. Simply put,ecommerce is an umbrella term for selling and buying online, while mobile commerce, or mcommerce, is a subcategory of ecommerce that focus on purchasing viamobile devices.

3 0
3 years ago
To rearrange the data on your hard disk so your computer can run more efficiently, you use ____.
Ratling [72]
A disk optimization program, but they're probably looking for defragmenting program.
5 0
3 years ago
Which of the following is the single best rule to enforce when designing complex passwords?
saw5 [17]

Answer:

B. Longer passwords

Explanation:

If the password is longer, it requires more incorrect attempts to find it, so the system could identify a potential hacker attempt. Smaller but more complex passwords could be identified by mistype or forgotten passwords.

3 0
3 years ago
How do I turn on your asus chromebook flip?
galben [10]
I believe the charger has to be connected for it to turn on.
3 0
3 years ago
What is the output of the following code snippet? int i = 1; while (i != 9) { System.out.print(i + " "); i++; if (i == 9) { Syst
Monica [59]

Answer:

1 2 3 4 5 6 7 8 End

Explanation:

int i = 1;

while (i != 9){

  System.out.print (i + " ");

  i ++;

  if (i == 9){

     System.out.println("End");

  }

}

7 0
2 years ago
Other questions:
  • In 1997, two South Korean manufacturers of semiconductors, LG Semicon and Hyundai Electronics, were accused of selling dynamic r
    14·1 answer
  • Search engines enable you to
    9·2 answers
  • Outcomes resulting from using incorect requirement specification during system development​
    11·1 answer
  • Your computer will organize files into
    6·2 answers
  • 2 (01.01 LC)
    5·1 answer
  • Which CIDR network has the smallest possible number of hosts? a. 123.0.0.0/8 b. 123.45.0.0/16 c. 123.45.67.0/24 d. All have the
    10·1 answer
  • Look at (c), is it accurate? ​
    9·2 answers
  • A user logs in to a virtual world and creates an animated character representing themselves, which they then use to move through
    15·2 answers
  • What is pseudocode? O A way of describing a set of instructions in text form using plain english O A diagrammatic representation
    13·1 answer
  • Answer quickly!!!
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!