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
Nookie1986 [14]
3 years ago
13

Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user wil

l enter a number. The program should generate a ladder of X wherein the level depends on the number entered and the character should dictate whether it faces right or left.
Sample:

Character is r
Number is 3

Output
X
XX
XXX

Character is r
Number is 6
X
XX
XXX
XXXX
XXXXX
XXXXXX

Character is l
Number is 5

X
XX
XXX
XXXX
XXXXX
Computers and Technology
1 answer:
zvonat [6]3 years ago
7 0
Define variables
left is l
right is r

Ask input
left or right

Ask input value

Equate l or r to the input value

Show ladder with steps equal to input value and in the side of input variable
You might be interested in
What is internal storage device
Assoli18 [71]
Something like a hard drive.
5 0
3 years ago
Write a class named Taxicab that has three **private** data members: one that holds the current x-coordinate, one that holds the
Licemer1 [7]

Answer:

See explaination

Explanation:

class Taxicab():

def __init__(self, x, y):

self.x_coordinate = x

self.y_coordinate = y

self.odometer = 0

def get_x_coord(self):

return self.x_coordinate

def get_y_coord(self):

return self.y_coordinate

def get_odometer(self):

return self.odometer

def move_x(self, distance):

self.x_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

def move_y(self, distance):

self.y_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

cab = Taxicab(5,-8)

cab.move_x(3)

cab.move_y(-4)

cab.move_x(-1)

print(cab.odometer) # will print 8 3+4+1 = 8

7 0
3 years ago
Jackson builders is constructing new homes in the Parkway subdivision.The company needs the logic for an application that ncalls
lord [1]
<span>The calculatePrice() method can be written in C. It will use and return doubles (which allows for decimals). It will calculate the house price of $100K + $20K per bedroom and $30K per bathroom. Next it will take that price and append the sales percentage and return that value.
double calculatePrice(decimal numBedrooms, decimal numBathrooms, decimal salesPercentage)
{
decimal housePrice = 100000 + (20000 * numBedrooms) + (30000 * numBathrooms);
return housePrice + (housePrice * salesPercentage);
}</span>
8 0
3 years ago
Your boss (the IT director) wants to move several internally developed software applications to an alternate environment, suppor
satela [25.4K]

Answer:

A. PaaS

Explanation:

There are various cloud services like PaaS (platform as a service), IaaS (infrastructure as a service), SaaS (software as a service) etc.

The PaaS is a platform based service where online and adaptive environment is available to run software applications on several digital platforms. Unlike SaaS, it does not provide software services but an environment to install and run other applications.

7 0
3 years ago
Which of the following is an example of an access object?
Julli [10]

Answer:

The Data Access Object pattern is a structural pattern that allows us to isolate the application/business layer from the persistence layer

<h2>I'm not sure but tell me if its right or wrong in order to help others</h2>

Explanation:

4 0
3 years ago
Other questions:
  • Match terms in the first column with the order descriptions in column two.
    11·1 answer
  • Which presenter would most likely benefit from a custom slide show?
    10·2 answers
  • Peter has recently bought a media player and a digital camera he wants to buy a memory card and then use devices which memory do
    11·2 answers
  • For the past three years, the interviews conducted at Gavallet, an e-commerce site, have been following the same pattern. Candid
    9·1 answer
  • Role of memory in a computer system
    10·1 answer
  • The names of the governing body or organizationds that creates rules for information technology and information communication te
    9·1 answer
  • Class C Airspace inner ring begins at the __________ and extends vertically (by definition) to MSL charted values that generally
    5·1 answer
  • 4. Give four reasons why a laptop computer is more expensive than a desktop computer of the
    10·1 answer
  • Write a Dice Game program that generates two random dice values between 1 and 6 for you, and 2 for the computer. You get to roll
    5·1 answer
  • You conduct an experiment to find the probability of a flipped coin landing on
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!