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

1.21 LAB: Divide by x

Computers and Technology
2 answers:
dangina [55]1 year 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]1 year 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
QUESTION 9 of 10: Bob charged $200 for a plane ticket last month. When he received his statement, he saw that he could pay the m
IgorLugansk [536]

Answer:

yes cuz 25x8=200

Explanation:

3 0
2 years ago
Read 2 more answers
Peter accumulated many photos from his visit to Wisconsin. He wants to upload these photos to a social networking site. Which fi
daser333 [38]

Answer:

JPG / JPEG best choice and work well on websites

Explanation:

JPEGs contains millions of colors, so this type of file is ideal for photographs.

Best choice for posting on social media channels

7 0
2 years ago
Write a statement to add the key Tesla with value USA to car_makers. Modify the car maker of Fiat to Italy. Sample output for th
marishachu [46]

Answer:

Input code:

car_makers = {'Honda': 'Japan', 'Fiat': 'Germany'}

#add Tesla and USA as corresponding value

car_makers['Tesla'] = 'USA'

#change Fiat entry to Italy instead of Germany

car_makers['Fiat'] = 'Italy'

print(car_makers)

print('Honda made in', car_makers['Honda'])

print('Fiat made in', car_makers['Fiat'])

print('Tesla made in', car_makers['Tesla'])

Explanation:

The first line is a define object in the python code, containing two entries of Honda and Fiat and their respective countries.

The python code adds an entry to the object "car maker" using the bracket notation, the tesla car from USA.

The country of the Fiat car is changed from Germany to Italy, using the bracket notation.

The output of the complete object and the individual cars is given.

<u>output of the python code:</u>

{'Honda': 'Japan', 'Fiat': 'Italy', 'Tesla': 'USA'}

Honda made in Japan

Fiat made in Italy

Tesla made in USA.

7 0
1 year ago
Write the prototype for a function named showValues. It should accept an array of integers and an integer for the array size as
aalyn [17]

Answer:

void showValues(int [<em>maximum</em><em> </em><em>volume</em>],int);

4 0
2 years ago
Read 3 more answers
Get user input as a boolean and store it in the variable tallEnough. Also, get user input as a boolean and store it in the varia
frozen [14]

Answer:

I will code in JAVA.

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 

boolean tallEnough;

boolean oldEnough;

Scanner input = new Scanner(System.in);

tallEnough = input.nextBoolean();<em> //wait the input for tallEnough</em>

oldEnough = input.nextBoolean(); <em>//wait the input for OldEnough</em>

   if(tallEnough && oldEnough){

   System.out.print(true);

   } else {

   System.out.print(false);

   }

}

}

Explanation:

First, to accept user inputs you have to import the class Scanner. Then declare both variables before allowing the user to set input values for both boolean variables.

In the if-else statement checks if both variables are true, then prints true. Another case prints always false.

8 0
1 year ago
Other questions:
  • Which data type stores images and audio visual clips?
    15·1 answer
  • Write a boolean method that checks whether a given positive integer n is a perfect square. Use Math’s sqrt and round methods to
    11·1 answer
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    6·1 answer
  • Given an n-element array X, algorithm D calls algorithm E on each element X[i]. Algorithm E runs in O(i) time when it is called
    7·1 answer
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • Write the definition of a function named averager that receives a double parameter and return-- as a double -- the average value
    12·1 answer
  • Allison wants to use equations to simplify the process of explaining something to the Sales team, but the default eq
    8·2 answers
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
  • When pasting an object which has been copied from a different slide, where on the slide does the object paste, assuming nothing
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!