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
OleMash [197]
3 years ago
13

using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/4,..., 1/10.

Computers and Technology
1 answer:
ValentinkaMS [17]3 years ago
5 0
In python:

##Specifies the range that the variable 'number' should change within
for number in range(2,10):
##Prints the decimal equivalent of each fraction
    print(1 / number)
You might be interested in
A manager wants to set up an area that is not on the LAN but not quite on the Internet. This area will house servers that will s
andreev551 [17]

Answer:

1. DMZ  (Demilitarized zone)

Explanation:

In computer networking, a Demilitarized Zone is a physical or logical network designed to give an extra layer of security on the organization’s private network. The DMZ acts as an interface between an untrusted network such as the internet and the organization’s internal network. When a server is set up in a demilitarized zone, users can reach it via its public IP address. In case there is an attack on the server, the private network is still protected.

3 0
3 years ago
#include #include int main( ) { int value = 10; int pid; value += 5; pid = fork( ); if (pid > 0 ) { value += 20; } printf(val
ss7ja [257]

Explanation:

To understand how this program is working let us print the variable value at different stages of the program so that we can understand how it is working.

Intitally, value=10 when it was declared.

Then we added 5 and it become value=15

then we used fork() function which creates a parent(orignal) and child(duplicate)

When fork() succeeds it returns the child pid to parent and returns 0 to the child. As you can see (pid > 0) condition is always true therefore the parent pid value becomes 35 ( 15+20) and the child pid value becomes 0.

#include <stdio.h>

#include <unistd.h>

int main( ) {

   int value = 10;

     printf("%d\n",value);

   int pid;

   value += 5;

     printf("%d\n",value);

   pid = fork( );

     printf("%d\n",pid);

   if (pid > 0 )

   {

       value += 20;

   }

   printf("%d\n",value);

   return 0;

}

Output:

10 (initial value)

15 (modified value)

5343 (pid when fork is used)

35 (final modified value)

0 (child value)

15 (the parent value when fork was used)

8 0
3 years ago
In which step of writing a program does a programmer first use a<br> compiler?<br> documentin
Allisa [31]

A compiler is often used when you want to test your code; that would often be your second step.

6 0
3 years ago
Choose all that apply.
stiks02 [169]

Answer:

choose all that apply

Explanation:

7 0
3 years ago
What does a spam e-mail normally promise you?
nlexa [21]
The answer is a virus
7 0
3 years ago
Other questions:
  • What Windows Server 2016 feature leverages the storage contained on a network of servers and adds a new level of fault tolerance
    14·1 answer
  • 1. Zack sees an online contest. He could win $10,000 instantly! On the sign-up form, he enters his name and email address. He is
    15·1 answer
  • A method that receives a two-dimensional array uses two ____ pairs following the data type in the parameter list of the method h
    11·1 answer
  • Write a program to display the roll number of students who have scored 100 in math. display appropriate message if none have sco
    5·1 answer
  • The used of PPE in the shop includes the following, except:
    10·2 answers
  • which feature of organisations to manage needs to know about to build and use information system successfully
    6·1 answer
  • Which of these is not a valid form<br>layout in Microsoft Access?​
    11·1 answer
  • The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and eac
    12·1 answer
  • Being a part of an organization or giving back to the community is which rewards of work factor?
    6·1 answer
  • A manager suspects that one of his team members has been fraudulently accessing confidential and sensitive information and breac
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!