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
Softa [21]
3 years ago
12

Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by

the first character of s2, followed by the second character of s1, followed by the second character of s2, and so on (in other words the new string should consist of alternating characters of s1 and s2). For example, if s1 contained "hello" and s2 contained "world", then the new string should contain "helloworld". Associate the new string with the variable s3.
Computers and Technology
1 answer:
LiRa [457]3 years ago
3 0

Answer:

s1='abc'

s2='wxyz'

length=len(s1)

s3=''

for i in range(length):

   s3+=s1[i]+s2[i]

print(s3)

You might be interested in
Which setting indents all but the first line of a paragraph by the selected length?
Phoenix [80]

Answer:

Hanging

Explanation:

5 0
3 years ago
What is the least number of bits you would need to borrow from the network portion of a Class B subnet mask to get at least 130
Tatiana [17]

Answer: Eight

Explanation:

A class B address is 255.255.0.0. We need to borrow 8 bits from the network portion to have atleast 130 host per subnet.

11111111.00000000.00000000.00000000

8 0
3 years ago
The spreadsheet below shows a list of fruits with their calorie count, grams of sugar, dietary fiber, and protein. Which set of
dangina [55]

Answer:

Filter Calories by over 100 calories, and sort Sugar in descending order.

Explanation:

4 0
2 years ago
Given a Student class, create a class with following characteristics:
Kay [80]

Answer:

ssume that,

Maximum “students” count can be 10.

*Driver Class*

*Solution class*

import java.util.*;

class Student {

private String name;

private int rollNo;

public String getName() {}

public void setName(String name) {}

public int getRollNo() {}

public void setRollNo(int rollNo) {}

};

class ClassRoom {

private int i;

private Student[] students;

public void addStudent(String name, int rollNo) {}

public Student[] getAllStudents() {}

};

8 0
3 years ago
Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number
sineoko [7]

Answer:

// using c++ language

#include "stdafx.h";

#include <iostream>

#include<cmath>

using namespace std;

//start

int main()

{

 //Declaration of variables in the program

 double start_organisms;

 double daily_increase;

 int days;

 double updated_organisms;

 //The user enters the number of organisms as desired

 cout << "Enter the starting number of organisms: ";

 cin >> start_organisms;

 //Validating input data

 while (start_organisms < 2)

 {

     cout << "The starting number of organisms must be at least 2.\n";

     cout << "Enter the starting number of organisms: ";

     cin >> start_organisms;

 }

 //The user enters daily input, here's where we apply the 5.2% given in question

 cout << "Enter the daily population increase: ";

 cin>> daily_increase;

 //Validating the increase

 while (daily_increase < 0)

 {

     cout << "The average daily population increase must be a positive value.\n ";

     cout << "Enter the daily population increase: ";

     cin >> daily_increase;

 }

 //The user enters number of days

 cout << "Enter the number of days: ";

 cin >> days;

 //Validating the number of days

 while (days<1)

 {

     cout << "The number of days must be at least 1.\n";

     cout << "Enter the number of days: ";

     cin >> days;

 }

 

 //Final calculation and display of results based on formulas

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

 {

     updated_organisms = start_organisms + (daily_increase*start_organisms);

     cout << "On day " << i + 1 << " the population size was " << round(updated_organisms)<<"."<<"\n";

     

     start_organisms = updated_organisms;

 }

 system("pause");

  return 0;

//end

}

Explanation:

6 0
2 years ago
Other questions:
  • What has prompted schools to add Internet activities in their academic integrity policies?
    11·2 answers
  • Natural selection is a. how systems of rewards increase desired behaviors. b. the idea that the observable environment affects b
    6·1 answer
  • : How does the founder of Wikipedia keep a tight reign on accuracy? HELP PLEZ AT LEAST A PARGRAPH PLES
    6·1 answer
  • How do i show all emails from same sender in outlook
    13·2 answers
  • Which might be included in both your speaking outline and your preparation outline? A. Detailed descriptions of each main point
    8·1 answer
  • How have productivity programs improved the professional lives of people? (check all that apply)
    8·2 answers
  • A process at Host C receiving two incoming UDP segments from two different hosts will know that they originated from two differe
    14·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    15·2 answers
  • State three advantages of using a printer​
    15·1 answer
  • 1. The supervisory software of a computer is called _____ (a) operating system (b) high – level language (c) transistor
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!