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
ser-zykov [4K]
3 years ago
13

1.21 LAB: Divide by x

Computers and Technology
2 answers:
dangina [55]3 years ago
3 0

Answer:

Explanation:

The following code is written in Python. It is a function called divide_by_x and takes the user inputs as described. It then raises x to the third power and divides user_num by that number. This gives the same result as user_num divided by x three times. The answer is saved in the variable answer which is then returned to the user.

def divide_by_x(user_num, x):

   answer = user_num / (x**3)

   return answer

Feliz [49]3 years ago
3 0

Answer:

Explanation:

So I am pretty new to scripting so what I have is inelegant but it worked.

user_num = int(input())

x = int(input())

t1 = user_num//x

print(user_num//x, end = ' ')

t2 = t1//x

print(t1//x, end = ' ')

t3 = t2//x

print(t2//x, end = '\n')

You might be interested in
For a Windows laptop, what is the best way to save power when the computer will not be used for an extended period?
Natali5045456 [20]

Move the mouse under the bar at the top of the window and hold with the hand button keep holding the button and drag it across the screen.

5 0
3 years ago
Read 2 more answers
Write a program that asks the user to enter a number of seconds. There are 60 seconds in a minute. If the number of seconds ente
frez [133]

Answer:

// here is code in c.

#include <stdio.h>

// main function

int main()

{

// variable to store seconds

long long int second;

printf("enter seconds:");

// read the seconds

scanf("%lld",&second);

// if seconds is in between 60 and 3600

if(second>=60&& second<3600)

{

// find the minutes

int min=second/60;

printf("there are %d minutes in %lld seconds.",min,second);

}

// if seconds is in between 3600 and 86400

else if(second>=3600&&second<86400)

{

// find the hours

int hours=second/3600;

printf("there are %d minutes in %lld seconds.",hours,second);

}

// if seconds is greater than 86400

else if(second>86400)

{

// find the days

int days=second/86400;

printf("there are %d minutes in %lld seconds.",days,second);

}

return 0;

}

Explanation:

Read the seconds from user.If the seconds is in between 60 and 3600 then find the minutes by dividing seconds with 60 and print it.If seconds if in between 3600 and 86400 then find the hours by dividing second with 3600 and print it. If the seconds is greater than 86400 then find the days by dividing it with 86400 and print it.

Output:

enter seconds:89

there are 1 minutes in 89 seconds.

enter seconds:890000

there are 10 days in 890000 seconds.

8 0
3 years ago
_______ is a very common approach to multisystem authorization.
mart [117]

Password is a very common approach to multisystem authorization. Passwords can be made up of a combination of letters, numbers, and special characters.

Anyone who has used a computer knows how to use a password, which is the most commonly used authentication method. Password-based authentication is the most simple for adversaries to exploit. Passwords are frequently reused, and guessable passwords are created using dictionary words and publicly available personal information. Two-factor authentication (2FA) is a security system that requires two distinct forms of identification to gain access to something. The first factor is usually a password, and the second is usually a text message with a code sent to our smartphone, or biometrics such as your fingerprint, face, or retina.

Learn more about password here-

brainly.com/question/14580131

#SPJ4

7 0
1 year ago
Question very important cause after my school is over at 5 'oclock I will be playing rocket league if anyone wants to play just
jarptica [38.1K]

Answer:

So can u tell me wut is ur question...It is not understandable

6 0
3 years ago
Exactly how many times must the merge function call each of read and write to merge two arrays of size n/2 into an array of size
Rom4ik [11]

Answer:

Exactly how many times must the merge function call each of read and write to merge two arrays of size n/2 into an array of size n, assuming

i don t know

7 0
3 years ago
Other questions:
  • Create a class called Name that will have three fields first name, middle initial, and last name as parameters. Add a constructo
    15·1 answer
  • The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry.
    7·1 answer
  • Do you think that people have a “right” to remain anonymous online? Why or why not?
    6·1 answer
  • How to connect xbox one controller
    5·1 answer
  • The _____ feature will mark all changes made to a document for others to review at a later time.
    13·1 answer
  • Tanya wants to include an instructional video with all its controls on her office website. The dimensions of the video are as fo
    10·1 answer
  • Which code segment results in "true" being returned if a number is even? Replace "MISSING CONDITION" with the correct code segme
    9·1 answer
  • Does anyone know how to do Python Essentials 5.7.1.6 because i am completely lost
    5·1 answer
  • When i add someone to canvas course, do they get an invitation?.
    8·1 answer
  • The _____ standard spells out measures and security procedures to safeguard the card issuer, the cardholder, and the merchant.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!