QUESTION IMAGE
Question
the number of laptops and desktops ava has are read from input represented by integers num_laptops and num_desktops, respectively. ava receives 2 additional laptops. avas number of desktops increases to 6 times the original amount.
- first, write statements to update num_laptops and num_desktops.
- then, assign integer total_computers with the total number of laptops and desktops.
click here for example
learn how our autograder works
1 num_laptops = int(input())
2 num_desktops = int(input())
3
4
5
6 print(num_laptops, \laptops\)
7 print(num_desktops, \desktops\)
8 print(total_computers, \total\)
Step1: Update laptop count
num_laptops = num_laptops + 2
Step2: Update desktop count
num_desktops = num_desktops * 6
Step3: Calculate total computers
total_computers = num_laptops + num_desktops
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The completed code lines to fill in lines 4-5 are:
num_laptops = num_laptops + 2
num_desktops = num_desktops * 6
total_computers = num_laptops + num_desktops
When run, this will correctly update the counts and calculate the total number of computers.