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
Leya [2.2K]
3 years ago
11

Write a program using integers userNum and x as input, and output userNum divided by x three times.

Computers and Technology
1 answer:
andrezito [222]3 years ago
7 0

Answer:

# The user is prompted to enter number as dividend

# The received number is assigned to userNum

userNum = int(input("Enter the number you want to divide: "))

# The user is prompted to enter number as divisor

# The divisor is assigned to x

x = int(input("Enter the number of times to divide: "))

# divideNumber function is defined to do the division

def divideNumber(userNum, x):

   # counter is declared to control the loop

   counter = 1

   # the while-loop loop 3 times

   # the division is done 3 times

   while counter <= 3:

       # integer division is done

       # truncating the remainder part

       userNum = userNum // x

       # the result of the division is printed

       print(userNum, end=" ")

       # the counter is incremented

       counter += 1

# the divideNumber function is called

# the received input is passed as parameter

# to the function

divideNumber(userNum, x)

# empty line is printed

print("\n")

Explanation:

The // operator in python works like the / operator in C. The // operator returns only the integer part of division operation. For instance 6 // 4 = 1. The fraction part is discarded.

You might be interested in
LDAP is an industry standard employed by Microsoft, which enables IT departments to use a(n) __________ structure when creating
olchik [2.2K]

Complete Question:

LDAP is an industry standard employed by Microsoft, which enables IT departments to use a(n) __________ structure when creating user accounts and user groups.

(a)directory tree

(b)Organizational Unit (OU)

(c)forest

(d)file system

Answer:

(a) directory tree structure

Explanation:

Lightweight Directory Access Protocol (LDAP) is a special type of Directory Access Protocol (DAP) and it is a software protocol that allows the storage and retrieval of data objects (such as user accounts and user groups) that are arranged in an hierarchical directory structure. This hierarchical directory structure is called directory tree or directory information tree.

LDAP stores users and resources information of an organization. These information include usernames, passwords, email, human resource data e.t.c

5 0
3 years ago
Julio receives many emails from a healthcare site. He finds them useful, and he wants to save them all in a folder. How can he a
inysia [295]

Answer:

A

Explanation:

I took the test

6 0
3 years ago
What are the<br>advontages of social medio?​
MrMuchimi

Answer: some advantages are making sure you’re informed about things going on in the world and connecting with you’re friends or even talking to family members. I hope this answered you’re question!

Explanation:

6 0
3 years ago
How is kerning used in Word?
vladimir1956 [14]

Answer:

Following are the uses of kerning in the word is given below .

Explanation:

The keening in the Microsoft word is the method of pushing the characters nearer in by removing the unnecessary space between the character Following are the steps of using the kerning in the Microsoft word .

  • Choose the text that the user wanted kerning in the word .
  • Pressing the Ctrl+D it showing the dialog box.
  • After that there are number of option are seen then tap the check box of the  Kerning of fonts.
  • Fedding the option of spacing as per the user need .
  • Finally click on the "ok" option. It will make apply the kerning  in the Microsoft word
5 0
3 years ago
Read 2 more answers
____ means saving data in computer memory.
Dima020 [189]

Answer: Storage

Explanation:

Storage means means saving data in computer memory. Memory refers to the location which is meant for short-term data, while storage is the part of the computer system that allows an individual to store and also access data on long-term basis.

It should be noted that typically, storage usually comes in form of a hard drive or a solid-state drive.

3 0
3 years ago
Other questions:
  • Google plus has communities BUT
    5·2 answers
  • External hard disks use different technology than internal hard disks. ture or false
    6·1 answer
  • When a piston has three rings, the bottom ring will be?
    9·1 answer
  • Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; th
    8·2 answers
  • Omar is preparing to deliver a presentation to his class. It is about a program to collect samples from an asteroid that has bee
    13·1 answer
  • Outputting all combinations. Output all combinations of character variables a, b, and c using this ordering abc acb bac bca cab
    7·1 answer
  • When connecting past and present issues, it is best to follow a series of steps. Which step is missing from the pattern? 1. Iden
    13·1 answer
  • To use appropriate personal protective equipment we should​
    12·1 answer
  • 2. Which of the following statements describes a need or problem that can be solved using the technology design process.
    14·1 answer
  • Why is internet download speed slower on a computer vs phone
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!