Write a function named printPattern that takes three arguments: a character and two integers. The character is to be printed. The first integer specifies the number of times that the character is to be printed on a line (repetitions), and the second integer specifies the number of lines that are to be printed. Also, your function must return an integer indicating the number of lines multiplied by the number of repetitions. Write a program that makes use of this function. That is in the main function you must read the inputs from the user (the character, and the two integers) and then call your function to do the printing.

Answers

Answer 1

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

    char c;

    int n1, n2;

   

 System.out.print("Enter the character: ");

 c = input.next().charAt(0);

 System.out.print("Enter the number of times that the character is to be printed on a line: ");

 n1 = input.nextInt();

 System.out.print("Enter the number of lines that are to be printed: ");

 n2 = input.nextInt();

 

 printPattern(c, n1, n2);

}

public static int printPattern(char c, int n1, int n2){

    for (int i=0; i<n2; i++){

        for (int j=0; j<n1; j++){

            System.out.print(c);

        }

        System.out.println();

    }

    return n1 * n2;

}

}

Explanation:

*The code is in Java.

Create a function named printPattern that takes one character c, and two integers n1, n2 as parameters

Inside the function:

Create a nested for loop. Since n2 represents the number of lines, the outer loop needs to iterate n2 times. Since n1 represents the number of times that the character is to be printed, the inner loop iterates n1 times. Inside the inner loop, print the c. Also, to have a new line after the character is printed n1 times on a line, we need to write a print statement after the inner loop.

Return the n1 * n2

Inside the main:

Declare the variables

Ask the user to enter the values for c, n1 and n2

Call the function with these values


Related Questions

In cell F5, enter a formula using the PMT function. Insert a negative sign (-) after the equal sign in the formula to display the result as a positive amount. Use defined names for the rate, nper, and pv arguments as follows:
· rate argument: Divide the Rate by 12 to use the monthly interest rate.
· nper argument: Multiply the Term by 12 to specify the number of months as the periods.
· pv argument: Use the Loan_Amount as the present value of the loan.
2.In cell F6, enter a formula without using a function that multiplies 12 by the Term and the Monthly_Payment, and then subtracts the Loan_Amount to determine the total interest
3. in cell J5, enter another formula using the PV function. Use defined cell names for the rate, nper, and pmt arguments as follows:
· rate argument: Divide the Rate by 12 to use the monthly interest rate.
· nper argument: Subtract the year value in cell H5 from the Term, and then multiply the result by 12 to specify the number of months remaining to pay off the loan.
· pmt argument: Use the Monthly_Payment as a negative value to specify the payment amount per period.

Answers

Answer:

Open MS-Office Excel (a.) Define name for rate, nper and pv cells as Rate, Term and Loan_Payment. Select the cell then Menu > Formulas

helpppp me please..
........​

Answers

Answer:

The employer's monthly salary (X)

importance of information
literay to the society

Answers

Explanation:

Information literacy is important for today's learners, it promotes problem solving approaches and thinking skills – asking questions and seeking answers, finding information, forming opinions, evaluateing sources, and making decisions fostering successful learners, effective contributors, and confident individuals.

Is social media bringing people together or cause in sepretation?​

Answers

Answer:

IT BRINGS PEOPLE TOGETHERRRR

Explanation:

Ive met so many new people on Discord and I love them more than life its self

Answer:

Social media brings people together in my opinion because before social media people only had the option to call and message. Now with social media we have a way to express our creativity with pictures and videos that you can watch from your phone from anywhere.

what is computer? different between RAM and ROM?​

Answers

Answer:

RAM, which stand for RANDOM ACESS MEMORY and ROM whitch stand for READ ONLY MEMORY, are both present in your computer. RAM volatile memory that temporary store the file you are working on. ROM is a non volatile memory that permanently stores instruction for your COMPUTER.

The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the file is the following: Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period. The report should be in tabular forma

Answers

Answer:

In Python:

fname = input("Filename: ")

a_file = open(fname)

lines = a_file.readlines()

print("Name\t\tHours\t\tTotal Pay")

for line in lines:

eachline = line.rstrip(" ")

for cont in eachline:

 print(cont,end="\t")

print()

Explanation:

This prompts the user for file name

fname = input("Filename: ")

This opens the file

a_file = open(fname)

This reads the lines of the file

lines = a_file.readlines()

This prints the header of the report

print("Name\t\tHours\t\tTotal Pay")

This iterates through the content of each line

for line in lines:

This splits each line into tokens

eachline = line.rstrip(" ")

This iterates through the token and print the content of the file

for cont in eachline:

 print(cont,end="\t")

print()

Create a Department object which contains a name (String), budget (double), and an ArrayList of Employee objects. Each Employee object contains a FirstName (String). LastName(String), and an Address object. Each Address object contains a Street (String), Apartment (int), City (String), and State as a char array of length 2. The Apartment parameter is optional but the other three are mandatory! Ensure no Address object can be created that does not have them. Finally, create a test program that allows users to Add, Delete, Print, and Search the Employees of a Department.

Answers

Answer:

Explanation:

The following code is very long and is split into the 4 classes that were requested/mentioned in the question: Department, Employee, Address, and Test. Each one is its own object with its own constructor. Getters and Setters were not created since they were not requested and the constructor handles all of the variable creation. Address makes apartment variable optional by overloading the constructor with a new one if no argument is passed upon creation.

package sample;

import sample.Employee;

import java.util.ArrayList;

class Department {

   String name = "";

   double budget = 0;

   ArrayList<Employee> employees = new ArrayList<>();

   void Department(String name, double budget, ArrayList<Employee> employees) {

       this.name = name;

       this.budget = budget;

       this.employees = employees;

   }

}

------------------------------------------------------------------------------------------------------------

package sample;

public class Employee {

   String FirstName, LastName;

   Address address = new Address();

   public void Employee(String FirstName, String LastName, Address address) {

       this.FirstName = FirstName;

       this.LastName = LastName;

       this.address = address;

   }

}

-------------------------------------------------------------------------------------------------------------

package sample;

class Address {

   String Street, City;

   int apartment;

   char[] state;

   public void Address(String street, String city, char[] state, int apartment) {

       this.Street = street;

       this.City = city;

       this.state = state;

       this.apartment = apartment;

   }

   public void Address(String street, String city, char[] state) {

       this.Street = street;

       this.City = city;

       this.state = state;

       this.apartment = 0;

   }

}

-------------------------------------------------------------------------------------------------------------

package sample;

public class Test extends Department {

   public void add(Department department, Employee employee) {

       department.employees.add(employee);

   }

   public void delete(Department department, Employee employee) {

       for (int x = 0; x < department.employees.size(); x++) {

           if (department.employees.get(x) == employee) {

               department.employees.remove(x);

           }

       }

   }

   public void Print(Department department, Employee employee) {

       for (int x = 0; x < department.employees.size(); x++) {

           if (department.employees.get(x) == employee) {

               System.out.println(employee);

           }

       }

   }

   public void Search (Department department, Employee employee) {

       for (int x = 0; x < department.employees.size(); x++) {

           if (department.employees.get(x) == employee) {

               System.out.println("Employee is located in index: " + x);

           }

       }

   }

}

Which of the following parameters is optional sample(a,b,c,d=7

Answers

Parameter D is Optional as it is already assigned to an integer value: 7.

The optional Parameter is D as it is said to be assigned  an integer value of 7.

What are optional parameters?

This is known to be a process  that  is made up of optional choices that one do  not need to push or force so as to pass arguments at their set time.

Note that The optional Parameter is D as it is said to be assigned  an integer value of: 7 because it implies that one can use the call method without pushing the arguments.

Learn more about Parameter from

https://brainly.com/question/13151723

#SPJ2

8) What is the address of the first SFR (1/O Register)?​

Answers

Answer:

The Register A is located at the address E0H in the SFR memory space. The Accumulator is used to hold the data for almost all the ALU Operations. Some of the operations where the Accumulator is used are: Arithmetic Operations like Addition, Subtraction, Multiplication etc.

Which cable standard is a standard for newer digital cable, satellite, and cable modem connections?

Answers

Answer:

Coaxial cable

Explanation:

what does command do

Answers

The command key’s purpose is to allow the user to enter keyboard commands in applications and in the system.

1. P=O START: PRINT PP = P + 5 IFP
<=20 THEN GOTO START: * what is output​

Answers

Answer:

0

5

10

15

20

Explanation:

P=O should be P=0, but even with this error this is the output.

When P reaches 20 it will execute the loop once more, so 20 gets printed, before getting increased to 25, which will not be printed because then the loop ends.

3 uses of Microsoft word in hospital

Answers

Explanation:

You can write, edit and save text in the program.

Which of the following cannot be used in MS Office.
Joystick
Scanner
Light Pen
Mouse

Answers

Answer:

A.

Explanation:

A Joystick is a control device that is connected to the computer to play games. A joystick is similar in structure to a control stick used by pilots in airplanes and got its name from the same. A joystick contains a stick, base, extra buttons, auto switch fire, trigger, throttle, POV hat, and a suction cup. A joystick also serves the purpose of assistive technology.

The device which can not be used in MS Office is a joystick. Therefore, option A is correct.

Create an array of doubles to contain 5 values Prompt the user to enter 5 values that will be stored in the array. These values represent hours worked. Each element represents one day of work. Create 3 c-strings: full[40], first[20], last[20] Create a function parse_name(char full[], char first[], char last[]). This function will take a full name such as "Noah Zark" and separate "Noah" into the first c-string, and "Zark" into the last c-string. Create a function void create_timecard(double hours[], char first[], char last[]). This function will create (write to) a file called "timecard.txt". The file will contain the parsed first and last name, the hours, and a total of the hours. See the final file below. First Name: Noah

Answers

Solution :

[tex]$\#$[/tex]include [tex]$<stdio.h>$[/tex]  

[tex]$\#$[/tex]include [tex]$<string.h>$[/tex]    

void parse[tex]$\_$[/tex]name([tex]$char \ full[]$[/tex], char first[tex]$[],$[/tex] char last[tex]$[])$[/tex]

{

// to_get_this_function_working_immediately, _irst

// stub_it_out_as_below._When_you_have_everything_else

// working,_come_back_and_really_parse_full_name

// this always sets first name to "Noah"

int i, j = 0;

for(i = 0; full[i] != ' '; i++)

  first[j++] = full[i];

first[j] = '\0';  

// this always sets last name to "Zark"

j = 0;

strcpy(last, full+i+1);

// replace the above calls with the actual logic to separate

// full into two distinct pieces

}

int main()

{

char full[40], first[20], last[20];

double hours[5];

// ask the user to enter full name

printf("What is your name? ");

gets(full);

// parse the full name into first and last

parse_name(full, first, last);

// load the hours

for(int i = 0; i < 5; i++)

{

   printf("Enter hours for day %d: ", i+1);

   scanf("%lf", &hours[i]);

}

// create the time card

FILE* fp = fopen("timecard.txt", "w");

fprintf(fp, "First Name: %s\n", first);

fprintf(fp, "Last Name: %s\n", last);

double sum = 0.0;

for(int i = 0; i < 5; i++)

{

   fprintf(fp, "Day %i: %.1lf\n", i+1, hours[i]);

   sum += hours[i];

}

fprintf(fp, "Total: %.1f\n", sum);    

printf("Timecard is ready. See timecard.txt\n");

return 0;

}

Under which command group will you find the options to configure Outlook rules?
O Move
O New
O Quick Steps
O Respond

Answers

Answer:

Move

Explanation:

I hope that helps :)

Answer:

a). move

Explanation:

edge 2021 <3

What may make it easy for cybercriminals to commit cybercrimes? Select 2 options.

Cybercrimes are not classified as real crimes, only as virtual crimes.

They operate from countries that do not have strict laws against cybercrime.

They are not physically present when the crime is committed.

The United States has no law enforcement that acts against them.

Law enforcement agencies lack the expertise to investigate them.

Answers

Answer: They operate from countries that do not have strict laws against cybercrime.

They are not physically present when the crime is committed.

Explanation:

edg

Answer:

They operate from countries that do not have strict laws against cybercrime.

They are not physically present when the crime is committed.

Explanation:

If name is a String instance variable, average is a double instance variable, and numOfStudents is a static int variable, why won’t the following code from a class compile?public Student(String s) {name = s;average = getAverage(name);numOfStudents++;}public double getAverage(String x) {numOfStudents++;double ave = StudentDB.getAverage(x);return ave;}public static void setAverage(double g) {average = g;}a.The setAverage() method can’t access the average instance variable.b.The getAverage() method can’t increment the numOfStudents variable.c.The constructor can’t increment the numOfStudents variable.d.The getAverage() method can’t call a static method in the StudentDB class.

Answers

Answer:

a.

Explanation:

Based solely on the snippet of code provided on the question the main reason why the code won't compile (from the options provided) is that the setAverage() method can’t access the average instance variable. Since the average variable is an instance variable it means that it only exists inside the one of the functions and not to the entire class. Meaning that in this scenario it can only be accessed by the Student function and once that function finishes it no longer exists. Also, it is not one of the options but if these variables are instance variables as mentioned their type needs to be defined inside the function.

Suppose you decide to use the number of times you see any of the area codes of the places Yanay has been to in 50 spam calls as your test statistic. Question 7. Write a function called simulate_visited_area_codes that generates exactly one simulated value of your test statistic under the null hypothesis. It should take no arguments and simulate 50 area codes under the assumption that the result of each area is sampled from the range 200-999 inclusive with equal probability. Your function should return the number of times you saw any of the area codes of the places Yanay has been to in those 50 spam calls. Hint: You may find the textbook section on the sample_proportions function to be useful. For model_proportions, under the null hypothesis, what's the chance of drawing one of the area codes Yanay has recently been to

Answers

Answer:

In Python:

import random

def simulate_visited_area_codes():

   area_codes = []

   for i in range(51):

       num = random.randint(200,1000)

       area_codes.append(num)

   visited_codes = [289, 657, 786, 540]

   count = 0

   for i in range(51):

       for j in range(len(visited_codes)):

           if area_codes[i] == visited_codes[j]:

               count+=1

   return count

print("Visited Areas: "+str(simulate_visited_area_codes()))

Explanation:

So many incomplete details in your question, so I will fill in the gap (i.e. make assumptions)

The assumptions are:

The 50 area codes is stored in area_codes list; the codes are randomly generatedThe visited area codes is stored in visited_codes list, the list is initializes with [289, 657, 786, 540]

The program and explanation is as follows: (comments are written in bold)

#This imports the random module

import random

#This defines the function

def simulate_visited_area_codes():

#Thie initializes area_codes to an empty list

   area_codes = []

#This iterates from 1 to 50 and generate 50 random numbers to the area_codes list

   for i in range(51):

       num = random.randint(200,1000)

       area_codes.append(num)

#This initializes the visited_code

   visited_codes = [289, 657, 786, 540]

#This initializes count variable to 0

   count = 0

#This iterates through the list and looks for matching code between the area_code and the visited_code lists

   for i in range(51):

       for j in range(len(visited_codes)):

           if area_codes[i] == visited_codes[j]:

#The count variable is incremented by 1 for matching codes

               count+=1

#This returns the count

   return count

#The main begins here and prints the number of area code visited

print("Visited Areas: "+str(simulate_visited_area_codes()))

Simulate Function:

Simulate one or more responses from the distribution corresponding to a fitted model object.

The code is shown below:-

visited_test_statistics_under_null = make_array()

repetitions = 20000

for i in np.arange(repetitions):

  new_sum_of_correct_area_code = simulate_visited_area_codes()

  visited_test_statistics_under_null = np.append(visited_test_statistics_under_null, new_sum_of_correct_area_code)

visited_test_statistics_under_null( )

Learn more about the topic Simulate Function:

https://brainly.com/question/14492046

2. Write a Python regular expression to replace all white space with # in given string “Python is very simple programming language.”

Answers

Dear Parent, Please note that for your convenience, the School Fee counter would remain open on Saturday,27th March 2021 from 8am to 2 pm. Kindly clear the outstanding amount on account of fee of your ward immediately either by paying online through parent portal or by depositing the cheque at the fee counter to avoid late fee charges.For payment of fee the following link can also be used Pay.balbharati.org

Objective
Make a function that solves the quadratic equation, outputting both values of X. You do not have to worry about imaginary numbers. That is, I will only use input that creates a real output (such as the example screenshots).
NOTE: A function that uses the C version of pass by reference is required to get full credit on this assignment. The C++ form of pass by reference will receive no credit.
Details
STEP 1
#include at the top of your file so that you can use the sqrt function. The sqrt function calculates the square root. For example:
int x = sqrt(9.0)
Will leave x with the value 3, which is the square root of 9.
STEP 2
Define a function THAT USES PASS BY REFERENCE to take in three double inputs and provides two double outputs. In the equations below I use a, b, and c as the double input names and x1 and x2 as the output names.
Inside this function solve the quadratic equation for both possible values of x:
X 1 = − b + b 2 − 4 a c 2 a
That is, X1 is equal to -b + sqrt(b * b - 4 * a * c) then divide all of that by 2 * a.
X 2 = − b − b 2 − 4 a c 2 a
That is, X2 is equal to -b - sqrt(b * b - 4 * a * c) then divide all of that by 2 * a.
Note the difference. One adds sqrt(b * b - 4 * a * c) and the other subtracts it.
This can be done in several lines of code if you want or you can attempt to perform the entire calculation in one line of code.
STEP 3
In the main function read in 3 inputs from the user. Pass these inputs to the quadratic equation function along with the pass by reference variables for the output. Print the results to the screen.
Advice
Your quadratic equation function does NOT need to account for imaginary numbers. Stick with the example inputs to test your code.
If you get NAN that means your equation has an imaginary solution. Do not worry about it. Try different inputs.
The calculation itself is a minor portion of this grade. The majority of the grade comes from implementing pass by reference so make sure you have that part correct.
b2 is simple enough that you do not need to call the pow() function to calculate the power. Instead multiply b * b.
You may want to calculate the numerator into one variable and the denominator into another. You don't have to solve the entire equation on one line (though that is possible).
Since you are using pass by reference you can make the QuadraticEquation function into a void function. It does not need to return anything since it is returning calculations via pointers.
Use scanf on one variable at a time. Don't forget to use double data types and %lf with scanf.

Answers

Answer:

In C

#include <stdio.h>

#include<math.h>

void myfunc(double *a, double *b, double *c) {

  double x1, x2;

  x1 = (-(*b) + sqrt((*b)*(*b)- 4*(*a)*(*c)))/(2*(*a));

  x2 = (-(*b) - sqrt((*b)*(*b) - 4*(*a)*(*c)))/(2*(*a));

  printf("x1 = %f\n",x1);

  printf("x2 = %f\n",x2);}

int main () {

  double a,b,c;

  printf("a: "); scanf("%lf", &a);

  printf("b: "); scanf("%lf", &b);

  printf("c: "); scanf("%lf", &c);

  myfunc(&a, &b, &c);

  return 0;}

Explanation:

#include <stdio.h>

#include<math.h>  --- This represents step 1

Step 2 begins here

This gets the values of a, b and c from main by reference

void myfunc(double *a, double *b, double *c) {

This declares x1 and x2

  double x1, x2;

Calculate x1

  x1 = (-(*b) + sqrt((*b)*(*b)- 4*(*a)*(*c)))/(2*(*a));

Calculate x2

  x2 = (-(*b) - sqrt((*b)*(*b) - 4*(*a)*(*c)))/(2*(*a));

Print x1

  printf("x1 = %f\n",x1);

Print x2

  printf("x2 = %f\n",x2);}

Step 3 begins here

int main () {

Declare a, b and c as double

  double a,b,c;

Get input for a, b and c

  printf("a: "); scanf("%lf", &a);

  printf("b: "); scanf("%lf", &b);

  printf("c: "); scanf("%lf", &c);

Call the function to calculate and print x1 and x2

  myfunc(&a, &b, &c);

  return 0;}

internet is an interconnected networks
o true
o false

Answers

Answer:

True.

Internet is an interconnected network.

Which functions do you use to complete Step 3e? Check all that apply.

Animations tab
Animation styles
Design
Lines
Motion Paths
Reordering of animations

Answers

Answer: Animations tab

Animation styles

Lines

Motion paths

Explanation: Edg2021

Overheating of a computer can be easily prevented. Explain how​

Answers

Here are a few examples:

•] Keep away from windows or vents to prevent it from turning warm.

•] Clean off dust that’s on the computer.

•] Remove all the things that are blocking air to pass to let it cool down.

•] Putting a soft item below the computer is a action that is prohibited as it blocks the airways which causes it to overheat instead put it on a sturdy flat surface to prevent the aforementioned information.

•] To never overcharge your computer too 100% overnight or any time of the day since it overheats and causes battery life to be short, instead put it to charge when you’re conscious while keeping an eye on it, perhaps set a timer/alarm to notify you if you forget.

5. In an array-based implementation of the ADT list, the getEntry method locates the entry by a. going directly to the appropriate array element b. searching for the entry starting at the beginning of the array working to the end c. searching for the entry starting at the end of the array working to the beginning d. none of the above

Answers

Expert Answer for this question-

Explanation:

Answer- C

You are working for a company that is responsible for determining the winner of a prestigious international event, Men’s Synchronized Swimming. Scoring is done by eleven (11) international judges. They each submit a score in the range from 0 to 100. The highest and lowest scores are not counted. The remaining nine (9) scores are averaged and the median value is also determined. The participating team with the highest average score wins. In case of a tie, the highest median score, among the teams that are tied for first place, determines the winner.
Scoring data is be provided in the form of a text file. The scoring data for each team consists of two lines; the first line contains the team name; the second line contains the eleven (11) scores. You will not know ahead of time how many teams will participant. Your program will:
Prompt the user for the name and location of the scoring data file.
Process the sets of records in the file.
Read and store the team name in a string variable.
Read and store the scores in an array.
Display the team name followed by the complete set of scores on the next line.
Calculate and display to two decimal places the average of the nine qualifying scores, dropping the lowest and highest scores.
Determine and display the median value among the qualifying scores.
Display the count of the number of participating teams.
Display the winning team name and their average score. Indicate if they won by breaking a tie with a higher median score value.
A sample data file has been provided to allow you to test your program before submitting your work. Records in the sample data file look like this:
Sea Turtles
11 34 76 58 32 98 43.5 87 43 23 22
Tiger Sharks
85 55 10 99 35 5 65 75 8 95 22
The Angry Piranhas
30 10 80 0 100 40 60 50 20 90 70
The average score for the Sea Turtles was 46.5. The Angry Piranhas and the Tiger Sharks both had an average score of 50.0. The tiger sharks had a median value of 55.0, making them the winners of the competition.
You will define and use at least one function in your solution. As a suggestion, you should consider calling a function that sorts the array of judge’s score values into ascending order (lowest to highest). The advantage of doing this is that after being sorted, the lowest value is the first entry in your array and the highest value is the last entry in your array.
The average or arithmetic mean is a measure of central tendency. It is a single value that is intended to represent the collection of values. For this problem, you will only use nine of the values to determine the average. You will not include the highest score and the lowest score.
The median is another measure of central tendency. The median is often referred to as the middle value. In a set of values, half the values are less than the median and the other half are greater than the median. In a sorted array of five elements, the median is the third element. There are two values that are less then it and there are two values that are greater than it. In a sorted array of six values, the median is the simple average of the third and fourth values. In some cases, the median is a better representative value than the average.
You are encouraged to read the article entitled "Mixing getline with cin".
To receive full credit for this programming assignment, you must:
Use the correct file name.
Submit a program that executes correctly.
Interact effectively with the user.
Grading Guideline:
Correctly name the file submitted.
Create a comment containing the student’s full name.
Document the program with other meaningful comments.
Prompt the user for a file name and location.
Open, read, and process all the data in the input file.
Store the judge’s scores in an array.
Correctly display the team name and all scores.
Calculate and display the average score correctly.
Calculate and display the median score correctly.
Correctly count and display the number of competing teams.
Correctly determine and display the winning team and score.

Answers

Answer:

my sql

Explanation:

try with mysql

and database build

In C++
Write a simple program to test your Circle class. The program must call every member function at least once. The program can do anything of your choice.

Answers

Answer:

int main() {

   Circle* pCircle = new Circle(5.0f, 2, 3);

   pCircle->up();

   pCircle->down();

   pCircle->left();

   pCircle->right();

   cout << "X: " << pCircle->getx() << endl;

   cout << "Y: " << pCircle->gety() << endl;

   cout << "Radius: " << pCircle->getRadius() << endl;

   pCircle->print();

   pCircle->update_radius(4.0f);

   if (pCircle->isUnit()) {

       cout << "is unit" << endl;

   }

   pCircle->move_x(10);

   pCircle->move_y(10);

}

Explanation:

something like that?

# 1) Complete the function to return the result of the conversion
def convert_distance(miles):
km = miles * 1.6 # approximately 1.6 km in 1 mile

my_trip_miles = 55

# 2) Convert my_trip_miles to kilometers by calling the function above
my_trip_km = ___

# 3) Fill in the blank to print the result of the conversion
print("The distance in kilometers is " + ___)

# 4) Calculate the round-trip in kilometers by doubling the result,
# and fill in the blank to print the result
print("The round-trip in kilometers is " + ___)

Answers

Answer:

See explanation

Explanation:

Replace the ____ with the expressions in bold and italics

1)          return km

 

return km returns the result of the computation

2)  = convert_distance(my_trip_miles)

convert_distance(my_trip_miles) calls the function and passes my_trip_miles to the function

3)  + str(my_trip_km)

The above statement prints the returned value

4)  +str(my_trip_km * 2)

The above statement prints the returned value multiplied by 2

Consider the following static method, calculate.

public static int calculate(int x)
{
x = x + x;
x = x + x;
x = x + x;

return x;
}
Which of the following can be used to replace the body of calculate so that the modified version of calculate will return the same result as the original version for all values of x?

return 8 * x;
return 3 + x;
return 3 * x;
return 6 * x;
return 4 * x;

Answers

Answer:

return 8 * x;

Explanation:

Required

What can replace the three lines of x = x + x

We have, on the first line:

[tex]x=>x +x[/tex]

[tex]x=>2x[/tex]

On the second line:

[tex]x=>x +x[/tex]

[tex]x=>2x[/tex]

Recall that, the result of line 1 is: [tex]x=>2x[/tex]

So, we have:

[tex]x=>2 * 2x[/tex]

[tex]x=>4x[/tex] --- at the end of [tex]line\ 2[/tex]

On the third line:

[tex]x=>x +x[/tex]

[tex]x=>2x[/tex]

Recall that, the result of line 2 is: [tex]x=>4x[/tex]

So, we have:

[tex]x = 2 * 4x[/tex]

[tex]x => 8x[/tex]

So: 8 * x can be used

what does the
command do

Answers

Please specify your question.
Other Questions
On a snowy winter's eve, two candles are lit at the exact same time. A 18-inch candle and a 21-inchcandle are lit at the exact same time. The 18-inch candle burns 2 inches every hour. The 21-inchcandle burns 3 inches every hour. 12. 14.5% of 90 is n. The value of n is 15. An electromagnetic wave has a frequency of 3.7 x 10 Hz and a speed of 3 x 10 m/s. Use the equation for wavelength to calculate the wavelength of this wave. 1 A can in the shape of a cylinder has a diameter of 6 centimeters and a height of 10centimeters. Which measurement is closest to the total surface area of the can insquare centimeters? Write the fraction as a decimal.Round to the nearest hundredth.7/18~ [?] Garth is building a square shaped frame for a mirror. The area of the mirror is 144 square inches. How long is each side of the frame, in inches? What number should go into the blank so that the two expressions are equivalent to each other?4(4b + 17c) = __b + 68c When the equation H2 + Fe3O4 = Fe + H2O is completely balanced using the smallest whole numbers, the coefficient oH2 would be A.) 1 B.)2 C.) 3 D.) 4 What are three powers belonging to the State governments Im confused.. someone help me please it would really mean the world to me. help me please, please Dr. King was a young man in 165, only 36 years old (Harned is 35, so he was YOUNG, okay?). What are the pressures that are weighing on Dr. King during the period surrounding the Selma marches? What factors must he consider as he decides whether or not to go through with the marches?Please help me High-healed shoes have had a place in womens' fashion for centuries. What is wrong with this sentence? PLEASE HELP ME!!!! HOW DO I GRAPH THIS?????? IN MENUwebwork / W2021math267 / assignment_3_power_series_and_taylor_series / 8rsesework Setssignment 3wer Series andlor SeriesAssignment 3 Power Series and Taylor Series: PPrevious ProblemProblem ListNext ProblemProblem 8ettingscos(4x2) - 1(1 point) Let f(x) =Evaluate the 10th derivative of f at x = 0.x2Problemsf(10)(0) =Hint: Build a Maclaurin series for f(x) from the series for cos(x).123Preview My AnswersSubmit AnswersYou have attempted this problem 5 times.Your overall recorded score is 0%.You have 1 attempt remaining. if ABC is a straight line and angle CBD=119 help with geometry question please A frictionless piston-cylinder contains carbon dioxide gas (CO2) initially at 500oC and 2 MPa. The system is o3 cooled in an isobaric process until the final temperature becomes 350 C and the final volume is 1 m . For this process, determine: (a) The reduced pressure and the reduced temperature of the initial state. (b) The initial volume of the piston-cylinder (in m3). (c) The mass of CO2 in the piston-cylinder (in kg). (d) The total boundary work for the process (in kJ). (e) The amount of heat transfer during the cooling process (in kJ). Capital M = Melanin, darker skin color Capital N = No Melanin, lighter skin color Imagine the following couple; NN NN NN (female) x NN MN NN (male) 13. Give the phenotypes for these parents. Female: lightest skin color Male: dark skin 14. a. What is the genotype of the darkest child they could have? b. What are the odds of producing such a child? Show your math: 14 - MNMNMN -middle brown skin 15. a. What is the genotype of the lightest child they could have? b. What are the odds of producing such a child? 16. What are the odds of having a child that is heterozygous for all three genes? All of the major components of the light reactions, including the pigment moleculesclustered in photosystems I and II, are located in the thylakoid membrane. What is the advantage ofhaving these components confined to the same membrane rather than dissolved in the stroma or thecytosol/cytoplasm? Explain your argument. (up to 5 points)