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
Wittaler [7]
3 years ago
6

#You may modify the lines of code above, but don't move them! #When you Submit your code, we'll change these lines to #assign di

fferent values to the variables. #There's an easy way to do this exercise, and a hard way. For #a hint on the easier way, revisit the sample answers for the #previous coding exercise. # #Above we've created a variable called mystery_string. Write #some code that will print the first letter of the string on #the first line, the first two letters on the second line, #the first three letters on the third line, etc., until it #prints the entire string on the last line. #
Computers and Technology
1 answer:
Musya8 [376]3 years ago
8 0

Answer:

The solution code is written in Python:

  1. mystery_string = "Programming"
  2. output = ""
  3. for x in mystery_string:
  4.    output += x  
  5.    print(output)

Explanation:

Firstly, create a variable mystery_string to hold a random string (Line 1).

Create an output variable to hold an output string (Line 2).

Create a for-loop to traverse the mystery_string character by character (Line 4). In the iteration, get a character from the mystery_string, and concatenate it with output string (Line 5). Print the output string (Line 6) before proceed to the next iteration.

You might be interested in
Can you please answer the question in the picture ! :)
Ilya [14]

Answer:

Explanation: If and else statements are one of the most important parts of programming.

1. You add an if you do something if a condition is met. For example, if number of chocolates equals zero( a condition), and inside you can do something like buy more chocolates. And else statement happens if the if condition isn't met and you want to the code to do something else. You don't need this if you don't want anything to happen if the if condition isn't true.

2. This might be used in a number guessing game. Let's say you have to guess a number, if its correct the computer should correct but if you get it wrong it should display wrong. You can write if the number the user writes in equal to the number you are supposed to guess say correct. Else say wrong

Hope this helps. Please mark as brainliest! Thanks!

4 0
3 years ago
Write a function named times_ten. the function should accept an argument and display the product of its argument multiplied time
viva [34]
Since you did not specify a language  i am assuming C

void  x10(int   n){
printf("%d \n",n*10);
return;
}

3 0
3 years ago
Write a converter program for temperatures. This program should prompt the user for a temperature in Celsius. It should then con
Aleksandr [31]

Answer:

c = float(input("Enter the temperature in Celsius: "))

f = c * 1.8 + 32

print("The temperature in Fahrenheit: " + str(f))

k = (f - 32) / 1.8 + 273.15

print("The temperature in Kelvin: " + str(k))

Explanation:

*The code is in Python.

Ask the user to enter the temperature in Celsius

Convert the Celsius to Fahrenheit using the conversion formula and print it

Convert the Fahrenheit to Kelvin using the conversion formula and print it

3 0
3 years ago
Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
laiz [17]

Answer:

By Using the Greedy- Activity- Selection algorithm

Explanation:

The Greedy- Activity- Selection algorithm in this case involves

First finding a maximum size set S1, of compatible activities from S for the first lecture hall.

Then using it again to find a maximum size set S2 of compatible activities from S - S1 for the second hall.

This is repeated till all the activities are assigned.

It requires θ(n2) time in its worse .

8 0
3 years ago
If the motherboard is not getting power, it will not start the boot. ... A four-year old laptop will not boot and presents error
lakkis [162]

Answer:

<em>The right order of steps you should take to repare the laptop is: D A C B</em>

<em>Explanation:</em>

<em>D. Ask yourself if the laptop is still under warranty: Because they will replace the board for you or give you a new machine.</em>

<em>A. Ask yourself if replacing the motherboard will cost more than purchasing a new laptop: since technology evolve every day, you might consider buying a new faster, better, advanced machine.</em>

<em>C. Find the service manual to show you how to replace the motherboard: the support assistence will guide you trhough the right way of replacing the board.</em>

<em>B. Find a replacement motherboard: choose the specific one or maybe try to find a better model, that can improve your computer performance.</em>

7 0
3 years ago
Other questions:
  • Why is driving a privilege?
    15·2 answers
  • . char values are surrounded by _____ quotes
    15·1 answer
  • Which two sentences uses the colon correctly?
    13·1 answer
  • Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in
    11·1 answer
  • Describe the following types of data hazards. RAW WAR WAW
    13·1 answer
  • Imagine that you have a friend who has expressed interest in designing and programming video games. He loves to play video games
    10·1 answer
  • It is unlawful in the State of Florida for any person, ______________________, to be a passenger in the front seat of a motor ve
    7·1 answer
  • If your microwave oven is a computer, define its Operating System and User Interface.
    12·1 answer
  • it is used to hold screws, jumpers, fasteners, and other small parts and prevent them from getting mixed together​
    15·2 answers
  • Refund please, this has not helped at all.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!