answer.
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
Alecsey [184]
1 year ago
5

Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is 2000 2, t

he output is: 1000 500 250 125 Note: In Coral, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).this must be written in Coral Language
Computers and Technology
1 answer:
Vitek1552 [10]1 year ago
4 0

Answer:

integer userNum

integer x

integer i

put "Enter the user number: "

userNum = Get next input

put "Enter the x value: "

x = Get next input

for i = 0; i < 4; i = i + 1

            put userNum/x to output

Explanation:

Coral Programming language is an ultra-simple programming language for learning programming. The first three rows of the code block declare the variables 'userNum', 'x', and 'i'. The "Get next input" and the "Put 'output_value' to output" are used by the program to get input from the user and output a value to the screen respectively.

You might be interested in
The vast amount of data collected from Internet searches, social media posts, customer transactions, military
Brums [2.3K]

Answer:

A. Big Data

Explanation:

It is big data. The internet searches, customer transactions, social media posts, medical tests, weather sensors, military surveillance, and all the data source you are seeing around yourself forms together with the big data. And a big social media company gathers around so many petabytes of data each day. And there are so many such companies, plus all sorts like eLearning sites, etc. And all these together form the big data.

3 0
2 years ago
5. Assume a computer has a physical memory organized into 64-bit words. Give the word address and offset within the word for eac
spin [16.1K]

Answer:

see explaination and attachment

Explanation:

5.

To convert any byte address, By, to word address, Wo, first divide By by No, the no. of bytes/word, and ignores the remainder. To calculate a byte offset, O, in word, calculate the remainder of By divided by No.

i) 0 : word address = 0/8 = 0 and offset, O = 0 mod 8 = 0

ii) 9 : word address = 9/8 = 1 and offset, O = 9 mod 8 = 1

iii) 27 : word address = 27/8 = 3 and offset, O = 27 mod 8 = 3

iv) 31 : word address = 31/8 = 3 and offset, O = 31 mod 8 = 7

v) 120 : word address = 120/8 = 15 and offset, O = 120 mod 8 = 0

vi) 256 :word address = 256/8 = 32 and offset, O = 256 mod 8 = 0

6. see attachment for the python programming screen shot and output

4 0
2 years ago
Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the ga
Alexus [3.1K]

Answer:

  1. def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon):
  2.    gallon_used = driven_miles / miles_per_gallon
  3.    cost = gallon_used * dollars_per_gallon  
  4.    return cost  
  5. miles_per_gallon = float(input("Input miles per gallon: "))
  6. dollars_per_gallon = float(input("Input dollar per gallon: "))
  7. cost1 = driving_cost(10, miles_per_gallon, dollars_per_gallon)
  8. cost2 = driving_cost(50, miles_per_gallon, dollars_per_gallon)
  9. cost3 = driving_cost(400, miles_per_gallon, dollars_per_gallon)
  10. print("$ %.2f" % cost1)
  11. print("$ %.2f" % cost2)
  12. print("$ %.2f" % cost3)

Explanation:

The solution is written in Python 3.

Firstly, create a function driving_cost that takes three parameters, driven_miles, miles_per_gallon and dollars_per_gallon (Line 1). In the function, calculate the gallon consumption by applying formula driven_miles / miles_per_gallon and then use it to calculate the cost (Line 2 - 3). Return the cost as output (Line 4).

In the main program, prompt user to input miles per gallon and dollars per gallon and then use these input values as arguments to call the function driving_cost function for three times with each time with different driven_miles value (Line 6 - 11).

At last, use formatted print to display the output to two decimal points (Line 13 - 15).

3 0
2 years ago
Read 2 more answers
Omar’s teacher has asked him to send her a PDF copy of his presentation via email.
Vadim26 [7]

Answer:

1. Export

2. Create PDF/XPS document

3. Standard

4. Click Publish

Explanation:

I got wrong on edg and found the correct answer

8 0
1 year ago
Which among the following enhances WS-Security to facilitate a mechanism for issuing, renewing, and validating security tokens?
Aleksandr-060686 [28]

Answer:

a. WS-Trust

Explanation:

WS-Trust can be defined as a WS-specification as well as OASIS standard that help to provides extensions to WS-Security, in order to facilitate a mechanism for issuing, renewing, as well as validating of security tokens which is why the aim and objectives of WS-Trust is to help and enable applications to construct trusted SOAP message exchanges.

Nevertheless WS-Trust enables the issuance as well as the dissemination of credentials within several and various trust domains.

5 0
1 year ago
Other questions:
  • Computer hardware without software is useless while computer software without hardware is meaningless. Discuss. Plz provide exam
    15·1 answer
  • What might be one reason why a stock becomes more valuable over time
    5·1 answer
  • Susan needs to change the color scheme in all the slides of her multimedia presentation. The presentation software program Susan
    10·2 answers
  • Given that a method receives three parameters a, b, c, of type double, write some code, to be included as part of the method, th
    6·2 answers
  • In your own words, what is pair-programming? What is the role of the driver? What is the role of the navigator? What are some be
    15·1 answer
  • Given an array of ints named x and an int variable named total that has already been declared, write some code that places the s
    6·1 answer
  • Check your tire pressure every _____. A. month B. two months C. six months D. year
    7·2 answers
  • Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. I
    12·1 answer
  • Complete this truth Table. Write a program that you can enter from the keyboard, a 1 or 0 into three Boolean variables, A,B,C. W
    14·1 answer
  • You are having a problem with your Windows computer that is isolated to a single graphics editing program that you use every day
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!