answer.
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
Elena L
3 months ago
8

In Python, what kind of error is returned by the following code? (e.g. NameError, ValueError, IOError, etc.) def my_func(n1, n2)

: return n1 + n2 my_func(1, 2, 3)​
Computers and Technology
1 answer:
Harlamova29_29 [1K]3 months ago
6 0

Answer:

SyntaxError.

Explanation:

https://www.quora.com/In-Python-what-kind-of-error-is-returned-by-the-following-code-e-g-NameError-ValueError-IOError-etc-def-my_func-n1-n2-return-n1-n2-my_func-1-2-3          original source

brainlest plz

You might be interested in
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i
ivann1987 [1066]

Response:

steps = int(input("Specify the number of steps: "))

miles = steps / 2000

print('{:.2f}'.format(miles))

Explanation:

Prompt the user to input the number of steps and convert the input to an integer.

Compute the corresponding miles by dividing the number of steps by 2000.

Output the miles formatted to two decimal places.

5 0
3 months ago
Explain how abstraction is used in a GPS system
ivann1987 [1066]

Answer

Abstraction in GPS technology allows the system to use clearly defined interfaces while enabling the integration of additional, more complex functionalities.

Explanation

The GPS system employs abstraction to organize layers of complexity for user interaction. It connects satellite-based positioning and timing systems to enable a radio receiver to acquire signals across four dimensions—latitude, longitude, altitude, and time—after synchronizing this data.


7 0
3 months ago
Read 2 more answers
(Java) Which of the following code segments correctly declare a Strings and gives it a value of "fortran".
maria [1035]

Response:

IT F

Clarification:

8 0
2 months ago
Compute the approximate acceleration of gravity for an object above the earth's surface, assigning accel gravity with the result
maria [1035]

Response:

Written in Python

G = 6.673 *pow(10,-11)

M = 5.98 *pow(10,24)

d = float(input("Enter distance: "))

g = (G * M)/(pow(d,2))

print("Calculated gravity acceleration: "+str(g))

Explanation:

The following line sets the gravitational constant

G = 6.673 *pow(10,-11)

This line establishes the mass of the Earth

M = 5.98 *pow(10,24)

This prompts the user to input the object's distance

d = float(input("Enter distance: "))

This calculates the gravity exerted on the object

g = (G * M)/(pow(d,2))

This line outputs the gravity acceleration without rounding

print("Calculated gravity acceleration: "+str(g))

8 0
3 months ago
Read two numbers from user input. Then, print the sum of those numbers. Hint -- Copy/paste the following code, then just type co
maria [1035]

Answer:

num1 = int(input("Input the first number "))

num2 = int(input("Input the second number "))

print(num1 + num2)

Explanation:

This code is implemented in Python programming language.

It utilizes the input function to ask the user for the first and second number.

The values are stored in the variables num1 and num2 in that order.

The print function then calculates and displays the sum of num1 and num2.

6 0
3 months ago
Read 2 more answers
Other questions:
  • Write a function solution that returns an arbitrary integer which is greater than n.
    13·1 answer
  • List at least six things you would check for if you were asked to evaluate the workspace of an employee for ergonomics
    10·1 answer
  • When performing actions between your computer and one that is infected with a virus which of the following offers no risk becomi
    5·1 answer
  • Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, prin
    14·1 answer
  • Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is not an actual computer programm
    11·1 answer
  • Assume that the following variables have been properly declared and initialized.
    12·1 answer
  • Factoring of integers. Write a python program that asks the user for an integer and then prints out all its factors. For example
    13·1 answer
  • There are two algorithms called Alg1 and Alg2 for a problem of size n. Alg1 runs in n2 microseconds and Alg2 runs in 100n log n
    13·1 answer
  • Social networking sites like Office Online, PayPal, and Dropbox are used to develop social and business contacts.
    6·2 answers
  • In today’s fast-paced, often "agile" software development, how can the secure design be implemented?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!