subject
Computers and Technology, 24.05.2021 18:20 tohanab

Assign first_three [int) to be the first three digits. Assign last_two [int) to be the last two digits. Assign middle_two (int) to be the middlt two digits. Print out the three values. For example, if the input is 123456 The first three digits: 123 The last two digits: 56 The middle two digits: 34 x_str = input ("Input x: ") # remember to convert to an int x_str = int(x_str) # first three = first_three = int (x_str // 1000) # last two = last-two = int (x_str % 100) # middle two = middle_two = int(x str // 10000 + 22) print("original input: ", x_str) print("first_three: ", first_three) print("last_two: ", last_two) print("middle_two: ", middle_two)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:20
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display “enter a value to be cubed.” input value; set cube = value ^ 3 display value, “ cubed is “, cube end while
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
You know the right answer?
Assign first_three [int) to be the first three digits. Assign last_two [int) to be the last two digi...
Questions
question
Geography, 12.04.2020 00:10
Questions on the website: 13722361