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
Leno4ka [110]
3 years ago
15

Code Example 4-3 main program: import arithmetic as a def main(): num1 = 5 num2 = 6 result = a.add(num1, num2) print("The sum is

", result) if __name__ == "__main__": main() arithmetic module: def add(x = 4, y = 2): z = x + y return z Refer to Code Example 4-3: What values are in x and y after the code runs? Select one:
a. 4, 2
b. 20, 12
c. 5, 6
d. 9, 8
Computers and Technology
1 answer:
melisa1 [442]3 years ago
6 0

Answer:

Option B.

Explanation:

You might be interested in
Which types of scenarios would the NETWORKDAYS function help calculate? Check all that apply.
Luden [163]

Answer:

The answer is A,B,D.

Explanation:

The answers: days of vacation time left

days of school left in the year & years of service someone performed

were correct on edgenuity. (IG:ixv.mona)

5 0
3 years ago
Clive wants to write a query that will display the names of the students who scored less than 10 in their final exams. Which num
Mice21 [21]
I'd go for <span>FLOOR(x)
</span>

The numerical function FLOOR(x) can be used to return the largest integer value that is less than or equal to the numerical expression provided. The numerical function CEILING (x) is the opposite of FLOOR(x) since it gives the smallest integer value that is greater or equal to the numerical expression.






6 0
3 years ago
Read 2 more answers
The following checksum formula is widely used by banks and credit card companies to validate legal account numbers: d0 + f(d1) +
Aleksandr [31]

Answer:

Here is the JAVA program:

import java.util.Scanner; //to import Scanner class

public class ISBN

{   public static void main(String[] args)  { // start of main() function body

   Scanner s = new Scanner(System.in); // creates Scanner object

//prompts the user to enter 10 digit integer

   System.out.println("Enter the digits of an ISBN as integer: ");    

   String number = s.next(); // reads the number from the user

   int sum = 0; // stores the sum of the digits

   for (int i = 2; i <= number.length(); i++) {

//loop starts and continues till the end of the number is reached by i

          sum += (i * number.charAt(i - 1) ); }

/*this statement multiplies each digit of the number with i and adds the value of sum to the product result and stores in the sum variable*/

          int remainder = (sum % 11);  // take mod of sum by 11 to get checksum  

   if (remainder == 10)

/*if remainder is equal to 10 adds X at the end of given isbn number as checksum value */

  { System.out.println("The ISBN number is " + number + "X"); }

  else

// displays input number with the checksum value computed

 {System.out.println("The ISBN number is " + number + remainder); }  }  }  

Explanation:

This program takes a 10-digit integer as a command line argument and uses Scanner class to accept input from the user.

The for loop has a variable i that starts from 2 and the loop terminates when the value of i exceeds 10 and this loop multiplies each digit of the input number with the i and this product is added and stored in variable sum. charAt() function is used to return a char value at i-1.

This is done in the following way: suppose d represents each digit:

sum=d1 * 1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5 + d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9

Next the mod operator is used to get the remainder by dividing the value of sum with 11 in order to find the checksum and stores the result in remainder variable.

If the value of remainder is equal to 10 then use X for 10 and the output will be the 10 digits and the 11th digit checksum (last digit) is X.

If the value of remainder is not equal to 10, then it prints a valid 11-digit number with the given integer as its first 10 digits and the checksum computed by sum % 11 as the last digit.  

8 0
3 years ago
WHO WANTS TO PLAY AMONG US
Elza [17]

Answer:

Explanation:

ME

8 0
3 years ago
Read 2 more answers
Call 334-399-4201 to annoyed my mom
yaroslaw [1]

Answer: why...

Explanation:

3 0
3 years ago
Other questions:
  • What is the input output ratio if its 12/23
    7·1 answer
  • What are six external parts of a computer
    11·1 answer
  • PLEASE HELP
    12·2 answers
  • Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. I
    12·1 answer
  • Which word goes with "meals
    5·2 answers
  • A _________ is a task at the lowest level of the WBS that represents the level of work that the project manager uses to monitor
    5·1 answer
  • Devon would like to install a new hard drive on his computer. Because he does not have a SATA port available on his motherboard,
    7·1 answer
  • Create a program that simulates a race between several vehicles. Design and implement an inheritance hierarchy that includes Veh
    11·1 answer
  • Hey guys, I don’t have a problem for you but If anyone knows do you still pass your grade level if you failed 1 class in the las
    11·2 answers
  • Where can formatting features be found ?! Need help asp !‍♀️
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!