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
Triss
2 months ago
8

Create an algorithm that will convert dog years to human years using the assumption that 1 dog year = 7 human years. Prompt the

user to enter the dog’s age in years. Multiply the dog’s age by 7 to calculate the human age equivalent of the dog’s age. For example, if a dog’s age is 2, the calculation should be human age equivalent = 2 * 7, which evaluates to the human equivalent of 14 years old. Output the result to the screen. Write the algorithm using pseudocode, and create a desk check using at least one set of test data.
Computers and Technology
1 answer:
amid [951]2 months ago
4 0

Response:

Procedure:

1. Define and set the variable one_dog_year to 7.

2.Request the user to input the dog's age.

   2.1 Capture the entered dog age and store it in variable "dog_age".

3.Generate a variable "human_age" for the corresponding human age.

   3.1 Compute the equivalent human age using the formula "human_age=one_dog_year*dog_age".

4.Display the calculated human age that corresponds to the dog's age.

7. Conclude the program.

// following is the algorithm executed in c++

#include <bits/stdc++.h>

using namespace std;

int main()

{

   // set one dog year

   int one_dog_year=7;

   int dog_age;

   int equi_h_age;

   cout<<"Enter the dog age:";

   // get the dog age

   cin>>dog_age;

   

   //determine the corresponding human age

   equi_h_age=dog_age*one_dog_year;

   cout<<"equivalent human age is: "<<equi_h_age<<endl;

return 0;

}

Result:

Enter the dog age:2

equivalent human age is: 14

You might be interested in
Write a loop that prints each country's population in country_pop. Sample output for the given program.
zubka84 [1067]

Response:

Correct script pertaining to the previous query that showcases the output.

for x, y in country_pop.items(): #this for loop iterates through the list items.

   print(str(x) + " has " + str(y) + " people") #output function to display the values.

Result:

  • This code is written in Python and produces the output required by the previous question.

Clarification:

  • The code in the previous question is intended for Python language to show the output, however, it has inaccuracies.
  • A 'for' loop is necessary, which will allow the items to be displayed one at a time.
  • The list presented is structured as key-value pairs, thus the use of the 'items' function from Python dictionaries is essential to present the list items.
  • Additionally, two variables must be established in the for loop, one representing the key and the other representing the value.
7 0
3 months ago
Assume that k corresponds to register $s0, n corresponds to register $s2 and the base of the array v is in $s1. What is the MIPS
Amiraneli [1052]
Your question is missing the section C, so here is the C segment while (k<n v="" k="k+1;" answer:="" while:="" bge="" end="" while="" n="" addi="" sll="" making="" indexable="" add="" lw="" sw="" j="" end:="" explanation:="" the="" mips="" assembly="" code="" reflecting="" c="" segment="" is="" />
4 0
2 months ago
Which of the following describes ETL? a) A process that transforms information using a common set of enterprise definitions b) A
zubka84 [1067]

Answer:

The right choice is d) All of these options are accurate.

Explanation:

ETL refers to Extract, Transform, and Load. An ETL framework retrieves data from various sources, upholds standards for data quality and consistency, standardizes data so disparate sources can be integrated, and ultimately presents the data in formats suitable for application development and decision-making by end-users.

4 0
3 months ago
Use Excel to develop a regression model for the Consumer Food Database (using the "Excel Databases.xls" file on Blackboard) to p
oksian1 [950]
Step 1: Use the provided formula to create an Indicator Variable for cities with metro areas. Step 2: Apply a filter to isolate data specific to metro cities, selecting only those marked with Metro Indicator 1. Step 3: Transfer the filtered data to a new worksheet. Step 4: Navigate to Data - Data Analysis - Regression. Step 5: Input the specified Y-variable and X-variable ranges as indicated. Choose the output range and ensure residuals are checked, which will produce the Output Summary and the Predicted Values alongside Residuals. Please see the accompanying attachment.
5 0
2 months ago
Other questions:
  • Which of the following type of online advertising intermediaries decide the placement and pricing of online display ads by using
    9·1 answer
  • Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per li
    11·1 answer
  • The Online Shopping system facilitates the customer to view the products, inquire about the product details, and product availab
    8·1 answer
  • A 2-dimensional 3x3 array of ints, has been created and assigned to tictactoe. Write an expression whose value is true if the el
    10·1 answer
  • Anna is making a presentation on the top five most visited cities in her state. she wants to make sure that she does not put in
    11·2 answers
  • Write a program to read-in a sequence of integers from the keyboard using scanf(). Your program will determine (a) the largest i
    8·1 answer
  • Consider a set A = {a1, . . . , an} and a collection B1, B2, . . . , Bm of subsets of A (i.e., Bi ⊆ A for each i). We say that a
    12·1 answer
  • What is the purpose of using self.id in tests, while working with unittest?A. self.id returns the name of moduleB. self.id retur
    15·1 answer
  • Why would Network Systems employees be employed by the government?
    12·2 answers
  • Create a procedure named FindLargest that receives two parameters: a pointer to a signed doubleword array, and a count of the ar
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!