subject

Write a program using integers user_num and x as input, and output user_num divided by x three times. Ex If the input is
2000
2
Then the output is
1000 500 250
Note: In Python 3, Integer division discards fractions. Ex 6 // 4 is 1 (the 0.5 is discarded)
LAB ACTIVITY: LAB: Divide by x
main. py Load default template
1 user_num int(input)
2 Xintinput)
3 for 1 in range (3)
4 user_num. user_num//
5 print(user_num)
6
1. Compare output ^
Output is nearly correct, but whitespace differs. See highlights below
Input
2000
2
Your output
1000
500
250
Expected output 1000|50|250
2. Compare output ^
Output is nearly correct, but whitespace differs. See highlights below.
Input
100
4
Your output
25
6
1
Expected output
25 |6|1|
3. Compare output ^
Output is nearly correct, but whitespace differs. See highlights below.
Input
8000
-2
Your output
-4000
2000
-1000
Expected output
- 4000|2000|-1000

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
question
Computers and Technology, 25.06.2019 01:30
The physical parts or components of a computer system is called .
Answers: 1
question
Computers and Technology, 25.06.2019 02:30
Technology has changed communications by replacing or supplementing traditional modes of communication that were primarily
Answers: 2
question
Computers and Technology, 25.06.2019 10:30
Design a payroll class with the following fields: • name: a string containing the employee's name • idnumber: an int representing the employee's id number • rate: a double containing the employee's hourly pay rate • hours: an int representing the number of hours this employee has worked the class should also have the following methods: • constructor: takes the employee's name and id number as arguments • accessors: allow access to all of the fields of the payroll class • mutators: let the user assign values to the fields of the payroll class • grosspay: returns the employee's gross pay, which is calculated as the number of hours worked times the hourly pay rate. write another program that demonstrates the class by creating a payroll object, then asking the user to enter the data for an employee in the order: name, id number, rate, hours. the program should then print out a statement in the following format (for example, if you had an employee named chris jacobsen with id number 11111, who works for 5 hours at $10/hr): chris jacobsen, employee number 11111, made $50.00 in gross pay. using text forming so that the gross pay is rounded to two decimal places.
Answers: 2
You know the right answer?
Write a program using integers user_num and x as input, and output user_num divided by x three times...
Questions
question
Social Studies, 27.08.2019 10:10
Questions on the website: 13722362