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
Marat540 [252]
3 years ago
14

Given input characters for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is: *

Computers and Technology
1 answer:
MrRa [10]3 years ago
6 0

Answer:

Following are the code to this question:

b= input()#defining b variable for input character value

h= input()#defining h variable for input character value

b_width=6#defining b_width variable that holds an integer value 6

r1 = ' ' * b_width+h#defining r1 variable that calculates hash lines

r2 = b*b_width+h*2#defining r3 variable that calculates 6 asterisk and 2 hash line  

r3 = b*b_width+h*3#defining r3 variable that calculates 6 asterisk and 3 hash line

print(r1)#print r1 variable value

print(r2)#print r2 variable value

print(r3)#print r3 variable value

print(r2)#print r2 variable value

print(r1)#print r1 variable value

Output:

please find the attachment.

Explanation:

In the given python code, three variable "b,h, and b_width" is declared, in which "b_width" holds an integer variable "6" and variable "b and h" is used to an input character value.  In the next line, "r1, r2, and r3" is declared, that holds arrowhead values which can be defined as follows:

  • In the "r1" variable, it stores space with b_width variable and one h variable value.
  • In the "r2" variable it stores b_width and 2*h variable value.
  • In the "r3" variable it stores b_width and 3*h variable value.

At the last, it prints the "r1, r2, and r3" variable value and for arrowheads,  it follows the above program code.

You might be interested in
To use a jQuery UI widget, you must code two things in the way that’s prescribed for the widget. What are they?
Natasha2012 [34]

Answer:

the jQuery code and the jQuery UI selectors.

Explanation:

When we want to use jQuery UI widget we have to code two things and these are the jQuery code and the jQuery UI selectors. jQuery UI is a managed set of user interface(UI) effects,interactions,themes and widgets built on top of  JavaScript jQuery Library.

So we have to code the jQuery and the jQuery UI selectors.

3 0
3 years ago
Write a class Example() such that it has a method that gives the difference between the size of strings when the '-' (subtractio
Mariulka [41]

Answer:

class Example:

def __init__(self, val):

self.val = val

def __gt__(self, other):

return self.val > other.val

def __sub__(self,other):

return abs(len(self.val) - len(other.val))

def main():

obj1 = Example('this is a string')

obj2 = Example('this is another one')

print(obj1 > obj2)

print(obj1 - obj2)

main()

\color{red}\underline{Output:}

3 0
3 years ago
Print "userNum1 is negative." if userNum1 is less than O. End with newline Convert userNum2 to 0 if userNum2 is greater than 8.
Butoxors [25]

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter User name 1 and 2");

       int userNum1 = in.nextInt();

       int userNum2= in.nextInt();

       if(userNum1<0){

           System.out.println("userNum1 is negative.");

       }

       else if(userNum2>8){

           userNum2 =0;

       }

       else{

           System.out.println("userNum2 is less than or equal to 8..");

       }

   }

}

Explanation:

This is implemented in Java programming language

Using the scanner class, the user is prompted to enter two numbers

These are saved in the variable userNum1 and userNum2 respectively.

If, else if and else statements are then used according to the specifications given in the question.

8 0
4 years ago
Which options are available when saving a video of a presentation? Check all that apply. file type
Lemur [1.5K]

Answer: file name, folder location, narration and audio, seconds per-slide timing

Explanation:

I just did it.

6 0
3 years ago
Read 2 more answers
Describe the third generation of computers​
djverab [1.8K]

Answer:

The period of third generation was from 1965-1971. The computers of third generation used Integrated Circuits (ICs) in place of transistors. A single IC has many transistors, resistors, and capacitors along with the associated circuitry.

The IC was invented by Jack Kilby. This development made computers smaller in size, reliable, and efficient. In this generation remote processing, time-sharing, multiprogramming operating system were used. High-level languages (FORTRAN-II TO IV, COBOL, PASCAL PL/1, BASIC, ALGOL-68 etc.) were used during this generation.

Third Generation

The main features of third generation are −

IC used

More reliable in comparison to previous two generations

Smaller size

Generated less heat

Faster

Lesser maintenance

Costly

AC required

Consumed lesser electricity

Supported high-level language

Some computers of this generation were −

IBM-360 series

Honeywell-6000 series

PDP (Personal Data Processor)

IBM-370/168

TDC-316

3 0
3 years ago
Other questions:
  • What does this say:<br> √ans
    6·2 answers
  • For this lab, youhave to write a programnamedseriesFunction.cthat prompts user to enter two values, x and n. Then it would use a
    11·1 answer
  • Which layer includes the physical transmission medium (cables or wireless media) that any network must use to send and receive t
    8·1 answer
  • Consider the following arrays. 1 4 21 2 4 100 B # 111(A) L3π 42 Write MATLAB expressions to do the tollowing a. Select just the
    13·1 answer
  • Need answer Quick!!!!!
    10·1 answer
  • What is communication ​
    5·2 answers
  • Assume that the vector arr has been declared. In addition, assume that VECTOR_SIZE has been defined to be an integer that equals
    10·1 answer
  • Which best describes the benefits of renting a home
    12·2 answers
  • Think of a genre (science, music, math, sports, video games, etc.) and create at least 10 questions. You can decide whether you
    15·1 answer
  • Terri brought a magazine for $5, and 2 bottles of nail polish. Write an expression to represent the total amount she spent. Then
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!