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
Lady bird [3.3K]
2 years ago
6

In Python, if var1 = "Happy" and var2= "Birthday" and var3 = (var 1+var2) *2, then var3 stores the string

Computers and Technology
1 answer:
nordsb [41]2 years ago
7 0

Answer:

The answer is "Option A".

Explanation:

The program to the given question can be given as:

program:

var1 = "Happy" #defining variable var1

var2= "Birthday" #defining variable var2

var3 = (var1+var2) *2 #defining variable var3 and calculate value

print (var3) #print value.

Output:

HappyBirthdayHappyBirthday

In the above python program, three variable is defined, that is var1, var2, and var3, in which variable var1 and var2 we assign a value, that is "Happy" and "Birthday".

In variable var3 we add the value of var1 and var2 variable and multiply by 2. It will print the variable value two times. and other options are not correct that can be defined as:

  • In option B and C, Both variable var1 and var2 print there values two times but in option B var1 value print two time and var2 value print one time only and option C var1 variable value is print only one time and var2 variable value is print two times that's why it is not correct.
  • In option C, Both variable var1 and var2 print there values two times that's why it is not correct.

You might be interested in
Why are mobile phone called cell phones?​
miss Akunina [59]

Answer:

they are called cells because the cellular was a chosen term because of how the towers and on the coverage map looked like a cell.

Explanation:

5 0
3 years ago
Write a function called show_info that takes a name, a home city, and a home state (a total of 3 arguments) and returns a full s
Delicious77 [7]

Answer:

Below are the function for the above question in java Language---

void show_info(String name,String home,String state)

    {

        System.out.println("Your name is "+name+" and you live in "+ home+" ,"+state +".");

    }

Output:

  • If the user inputs name="Gaus",city="LosAngeles" and state="California" then the output will be "Your name is Gaus and you live in LosAngeless, California."

Explanation:

  • The above function is in java language which takes three argument names, state, and the city.
  • The name will be stored on the name variable of the string type.
  • The state will be stored on the state variable of string type.
  • The city will be stored on the city variable of the string type.
  • Then the Output will be displayed with the help of the print function.
  • '+' is used to merge the string.
5 0
2 years ago
. The first step in devising security services and mechanisms is to develop a security policy True False
Evgen [1.6K]

Answer: True

Explanation: For the creation of the security services and function the first step is having a policy regarding the security measure that is to be taken.Security policy consist of the procedures and function that should be implement in the system as a plan.

It monitors the flow,accessing of external component ,data assessment etc fro the protection.After the policies are made then the implementation take place. The most common deployment of this policy is in information technology(IT)sector .Thus, the given statement is true..

5 0
3 years ago
Maria is conducting a security investigation and has identified a suspect. The suspect is an employee of the organization who ha
Snowcat [4.5K]

Answer:

k12

Explanation:

8 0
2 years ago
1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a s
masya89 [10]

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

 Scanner in = new Scanner (System.in);

       System.out.print("Enter favorite color:");

 String word1 = in.next();

       System.out.print("Enter pet's name:");

 String word2 = in.next();

       System.out.print("Enter a number:");

 int num = in.nextInt();

       System.out.println("you entered: "+word1+" "+word2+" "+num);

   }

}

Explanation:

Using Java Programming language

  1. Import the Scanner class
  2. create an object of the scanner class
  3. Prompt user to enter the values for the variables (word1, word2, num)
  4. Use String concatenation in System.out.println to display the output as required by the question.

7 0
2 years ago
Other questions:
  • Instructions: Type the correct answer in the box. Spell the word correctly.
    5·2 answers
  • Behaving in an acceptable manner within a workplace environment is referred to as having
    9·1 answer
  • In an inheritance situation, the new class that you create from an existing class is known as the:
    5·1 answer
  • When should students practice netiquette in an online course?
    9·1 answer
  • 60 POINTS!
    13·1 answer
  • How can you remove heat from a computer?
    10·1 answer
  • Which of the following are some of the ways that the media influences consumers behavior
    9·1 answer
  • If you want to insert a column into an existing table, what would you do?
    13·2 answers
  • Write a C++ function using recursion that returns the Greatest Common Divisor of two integers. The greatest common divisor (gcd)
    14·1 answer
  • PLEASE HELP!!!!! WILL MARK BEST ANSWER BRAINLIEST!!!~~~
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!