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
NeTakaya
3 years ago
12

Developed by Frank Vahid. Write a program using integers usernum and x as input, and output usernum divided by x four times. For

example, if the input is: 2000 2 where user_num = 2000 and x = 2, then the output must be: 1000 500 250 125 Note: all the values must be printed on the same line. Also, recall that in Python 3, integer division discards fractions. Ex: 6 // 4 is 1 (the 0.5 is discarded).
Computers and Technology
1 answer:
OleMash [197]3 years ago
7 0

Answer:

Explanation:

Let's do this in Python. We will loop through 4 times, each of the loop would compute the dividend, store it as string in a result variable and finally print the result on the same line:

def divide_4_times(user_num, x):

    result = ''

    for i in range(4):

         user_num /= x

         result += (' ' + str(user_num))

   print(result)

You might be interested in
The ________ is(are) used to display information on the computer's screen.
Novay_Z [31]

Answer:

cout object

Explanation:

Cout object -

This object is used while writing the program in the C++ , C , coding , the main function of Cout , is to display any information of the screen , is referred to as Cout object .

For example -

Cout<<"Hello";

From the above coding ,

The output would be -

Hello

The information to be displayed need to be written with double commas ( " " ).

5 0
3 years ago
An ink-jet printer is a type of impact printer. <br> a. True <br> b. False
Mumz [18]
The answer is: false it is not a impact printer
6 0
3 years ago
Aspiring graphic designers can earn a(n) certification for graphic design software, such as Photoshop and Acrobat.
kobusy [5.1K]

<u>Answer is:</u>

Yes, they earn a certification as a graphic designer


<u>Explanation:</u>

And they can do everything that graphic designer do, so that is why they earn a certification of a graphic designer such as Photoshop and adobe illustrator.

I hope you got the answer well. Thanks

5 0
3 years ago
Read 2 more answers
In which of the following ways can using test-taking tips help you?
bogdanovich [222]
In my opinion i think it is A
3 0
3 years ago
(1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a
Sergeu [11.5K]

Answer:

import java.util.Scanner;

public class num3 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter Favorite color");

       String word1 = in.next();

       System.out.println("Enter Pet's name");

       String word2 = in.next();

       System.out.println("Enter a number");

       int num = in.nextInt();

       //Point One

       System.out.println("You entered: "+word1+" "+word2+

               " "+num);

       //Point Two

       String passwordOne = word1+"_"+word2;

       String passwordTwo = num+word1+num;

       System.out.println("First password: "+passwordOne);

       System.out.println("Second password: "+passwordTwo);

       //Point Three

       int len_passwrdOne = passwordOne.length();

       int len_passwrdTwo = passwordTwo.length();

       System.out.println("Number of characters in "+passwordOne+" :" +

               " "+len_passwrdOne);

       System.out.println("Number of characters in "+passwordTwo+" :" +

               " "+len_passwrdTwo);

   }

}

Explanation:

  • This question is solved using java programming language
  • The scanner class is used to receive the three variables (Two string and one integer)
  • Once the values have been received and stored in the respective variables (word1, word2 and num), Use different string concatenation to get the desired output as required by the question.
  • String concatenation in Java is acheived with the plus (+) operator.
3 0
3 years ago
Other questions:
  • A web client is sending a request for a webpage to a web server. from the perspective of the client, what is the correct order o
    14·1 answer
  • All of the following are vertical alignment options except __middle , top, center, or_bottom_.
    12·1 answer
  • Someone who is young, lacks funds, and really wants to gain technical skills while serving his or her nation should consider
    8·1 answer
  • If your problem is caused by a bad hardware or software installation and you get an error message the first time you restart the
    6·1 answer
  • In Alphatech Systems, email software screens incoming messages by organizing them into mailboxes and identifying junk mail. As a
    13·1 answer
  • 11. Print Layout, Full Screen Reading, Web Layout, Outline and Draft are examples of _______. 12. What do you do if the spelling
    5·1 answer
  • Around what time did the Internet come around and how did it all start? Would like to know more of the history of how the intern
    12·1 answer
  • How many countries don't uses the metric system?​
    12·2 answers
  • Compiler is an example of​
    5·1 answer
  • One benefit proprietary licensed software is that it
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!