D335 Introduction to Programming in ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Python exam with correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
22.1 Lab: Convert to Seconds
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Write a program that reads in hours, minutes, and
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
seconds as input, and outputs the time in seconds ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
only.
22.2 Lab: Convert from Seconds
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
People find it easier to read time in hours, minutes,
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
and seconds rather than just seconds.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Write a program that reads in seconds as input and
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
outputs the time in hours, minutes, and seconds. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
, 22.3 Lab: Pizza Party ||\\||\\ ||\\||\\ ||\\||\\
Given the number of people attending a pizza party,
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
output the number of needed pizzas and total cost. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
For the calculation, assume that people eat 2 slices
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
on average and each pizza has 12 slices and costs
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
$14.95.
22.4 Lab: Hypotenuse ||\\||\\ ||\\||\\
Given two numbers that represent the lengths of a
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
right triangle's legs (sides adjacent to the right
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
angle), output the length of the third side (i.e. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
hypotenuse) with two digits after the decimal point. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Python exam with correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
22.1 Lab: Convert to Seconds
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Write a program that reads in hours, minutes, and
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
seconds as input, and outputs the time in seconds ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
only.
22.2 Lab: Convert from Seconds
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
People find it easier to read time in hours, minutes,
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
and seconds rather than just seconds.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Write a program that reads in seconds as input and
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
outputs the time in hours, minutes, and seconds. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
, 22.3 Lab: Pizza Party ||\\||\\ ||\\||\\ ||\\||\\
Given the number of people attending a pizza party,
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
output the number of needed pizzas and total cost. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
For the calculation, assume that people eat 2 slices
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
on average and each pizza has 12 slices and costs
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
$14.95.
22.4 Lab: Hypotenuse ||\\||\\ ||\\||\\
Given two numbers that represent the lengths of a
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
right triangle's legs (sides adjacent to the right
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
angle), output the length of the third side (i.e. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
hypotenuse) with two digits after the decimal point. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\