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
andrezito [222]
3 years ago
7

Create one Python module: arithmetic which has two functions: add(x, y) and get_length(x). The description of two functions are

below: def add(x, y): # add two numbers def get_length(x): # return the length of a given stringCreate one Python module: arithmetic which has two functions: add(x, y) and get_length(x). The description of two functions are below: def add(x, y): # add two numbers def get_length(x): # return the length of a given string
Computers and Technology
1 answer:
Hunter-Best [27]3 years ago
3 0

Answer:

def add(x,y):

   print(x+y)

def get_length(x):

   return len(x)

add(17,19)

print(get_length("harry potter"))

#or you can also take some user input

x=int(input("please enter an integer: "))

y=int(input("please enter an integer: "))

add(x,y)

x1=input("please enter any string: ")

print(get_length(x1))

Explanation:

in python3 programming language

You might be interested in
In which conditions, a trial balance does not tally?
Nostrana [21]

Answer:

A trial balance will not balance if both sides do not equal, and the reason has to be explored and corrected.

Explanation:

The debit side and the credit side must balance, meaning the value of the debits should equal the value of the credit

4 0
3 years ago
A unique aspect of Java that allows code compiled on one machine to be executed on a machine of a different hardware platform is
notka56 [123]

Answer:

Java's bytecode

Explanation:

To execute its operations, java programming languages uses bytecodes.

These bytecodes are literally instructions of a java virtual machine (or JVM). They are generated in form of a class file as soon as the java program is ran and executed. In other words, the java compiler compiles the code and generates the bytecode.

As soon as the bytecode is generated, it can be transferred to a different machine and platform completely and one can run this bytecode on this different machine.

8 0
3 years ago
ASAP: Type the correct answer in the box. Spell all words correctly.
DerKrebs [107]

Answer:

has?

Explanation:

i think i need a few more details then we can talk

4 0
3 years ago
Write a for loop to populate vector userGuesses with NUM_GUESSES integers. Read integers using cin. Ex: If NUM_GUESSES is 3 and
Tanzania [10]
#include <iostream>
#include <vector>

#define NUM_GUESSES 3

int main()
{
  std::vector<int> userGuesses;
  for (int i = 0, input; i < NUM_GUESSES; i++)
  {
    std::cin >> input;
    userGuesses.push_back(input);
  }
}
8 0
4 years ago
Read 2 more answers
______ is the software that blocks a user from being able to access your computer.
gavmur [86]
This would be your firewall

3 0
4 years ago
Read 2 more answers
Other questions:
  • What are the basic steps of programing??
    9·2 answers
  • Help PLEASE (in attachment)
    8·1 answer
  • What are three advantages of using social media to create awareness of your business?
    6·1 answer
  • Write a program that use a switch statement whose controlling expression is the variable area code. If the value of area_code is
    12·1 answer
  • The ____ option must be used when running a program in order to see the results of assert statements.
    7·1 answer
  • Can you please help look at the picture i will give you a. brainliest and 10 points​
    15·2 answers
  • Consider the relational schema below: Students(sid: integer, sname: string, major: string) Courses(cid: integer, cname: string,
    9·1 answer
  • Carbohydrates are a huge source of
    7·2 answers
  • Life was not easier a century ago<br><br>​
    9·2 answers
  • Write a line of code that declares a variable called shipName and set it equal to the string SpaceX3000.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!