subject

Write an interactive program to help youcount all of the boxes in a room. The programshould begin by asking something likeHow many unnumbered boxes can you see? Thenthe program will have you number those boxes from1 to m, where m is your answer. But, remember thateach box might have smaller boxes inside, so oncethe program knows you can see m boxes, it shouldask you to open box number 1 and take out any boxesyou find, numbering those boxes 1.1, 1.2, and soon. It will also ask you to open box number 2 andtake out any boxes you find there, numbering thoseboxes 2.1, 2.2, and so on. This continues for box 3, 4,up to m. And, of course, each time you number a box1.1 or 3.8 or something similar, that box might havemore boxes inside. Boxes that reside inside of 3.8would be numbered 3.8.1, 3.8.2, and so on. At theend, the program should print a single number tellingyou the total number of boxes in the room.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
question
Computers and Technology, 23.06.2019 22:00
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 12:40
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
Develop the program incrementally: a) start by reading and displaying each line of the input file to make sure you are reading the data set correctly. b) use the split string method to extract information from each line into a list. print the list to prove that this step is working correctly. d) convert the exam scores to type int and calculate the student’s average. display those items to prove this step is working correctly. e) create a tuple containing the six items for each student (name, exam scores, exam mean). display the tuples to prove this step is working correctly. (optionally, you may want to have the exam scores in a list so your tuple is (name, scores_list, f) append each tuple to a list. display the list to prove this step is working correctly. g) use the sort list method to re-order the tuples in the list. display the list to prove this step is working correctly. h) use a for statement to display the contents of the list as a table (with appropriate formatting). i) use a for statement to calculate the average of all scores on exam #1, then display the results. note that you could have calculated this average within the first loop, but we are explicitly requiring you to do this calculation by looping though your list of tuples. j) add the logic to calculate the average of all scores on exam #2, then display the results.
Answers: 2
You know the right answer?
Write an interactive program to help youcount all of the boxes in a room. The programshould begin by...
Questions
question
History, 02.03.2021 17:00
question
Mathematics, 02.03.2021 17:00
Questions on the website: 13722363