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
To plan a pizza party, one may want to order enough pizza for everyone. Use the slicesPerPizza, slicesPerGuest, and totalGuests
attashe74 [19]

Answer:

import java.util.Scanner;

public class num6 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter number of guest");

   int totalGuest = in.nextInt();

       System.out.println("Enter number of slices per guest");

   int slicesPerGuest = in.nextInt();

       System.out.println("How many Slices are on a pizza");

   int slicesPerPizza = in.nextInt(); // Assume each pizza has 5 slices

   double pizzasNeeded;

       //Calculating the pizza Needed

    int totalslicesNeeded  = totalGuest * slicesPerGuest;

    pizzasNeeded = totalslicesNeeded/slicesPerPizza;

       System.out.println(pizzasNeeded);

   }

}

Explanation:

In this program User is required to enter values for the variables totalGuest, slicesPerGuest  and slicesPerPizza

First calculate the totalSlices needed by totalGuest * slicesPerGuest;

The calculate number of pizzas needed by totalslicesNeeded/slicesPerPizza;

4 0
2 years ago
You have important data on your hard drive that is not backed up and your Windows installation is so corrupted you know that you
Solnce55 [7]

Answer:

b.Make every attempt to recover the data

Explanation:

If you have important data on your hard drive that is not backed up and your Windows installation is so corrupted you know that you must refresh the entire installation you should  make every attempt to recover the data.

4 0
3 years ago
In the game Singularity, broken objects can be restored to their original condition by reversing time. This is an example of whi
Zolol [24]

Solution:

In the game Singularity, broken objects can be restored to their original condition by reversing time. This is an example of which time element of player adjustment.

Thus the required answer is player adjusted.

6 0
3 years ago
Read 2 more answers
What is true about content based filtering
AleksAgata [21]

Answer: provide more info

Explanation:

8 0
2 years ago
Seven Features of computer aids design software
astra-53 [7]
Computer-aided engineering (CAE) and finite element analysis (FEA) Computer-aided manufacturing (CAM) including instructions to computer numerical control (CNC) machines. Photorealistic rendering and motion simulation. Document management and revision control using product data management (PDM).
3 0
2 years ago
Other questions:
  • What do you click to create a new presentation in Normal view? A. Section B. Blank Presentation C. Layout D. New Slide
    14·2 answers
  • Calls to the tostring( ) method emphasize the use of ____.
    12·1 answer
  • Electronic files created on a computer using programs such as word software are considered to be
    15·1 answer
  • Write the class RoadSegmet. The class inherits from Transportation Class. The Class have a vector hourlySpeeds data field which
    14·1 answer
  • Discuss the economical challenges in software reuse using suitable examples.
    10·1 answer
  • Write an algorithm to find perimeter of circle<br>​
    12·1 answer
  • List and explain three computing devices from the 20th century​
    13·2 answers
  • Write any two disadvantage of First generations computers​
    14·1 answer
  • Testing a website includes visiting every web page on the site and selecting every link, tab, and button available.
    11·1 answer
  • How does your ability to correctly count change affect the impression the customer has of you?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!