C. Download the file from the Lab 2 drop box in D2L. Write a script that will report answers to the problems below. o O O O O Save and upload the script to the D2L drop box. o Include a screen capture of your output. Provide code for your answer after each problem. After running your script, your answers should be in complete sentences. Use Python to perform all calculations. Provide comments as needed. ●●● ● 1. Suppose your chickens laid 403 eggs in one week. You put the eggs into cartons, each holding one dozen eggs. How many full cartons will you have? 2. Joe works a job paying $15/hour and Jill is paid $21/hour at her job. How much will they earn altogether in one week if Joe works 30 hours and Jill works 20 hours? 3. Elias has 69 quarters. He goes to the bank and trades in four quarters for a $1 bill. How many quarters will he still have left after trading for as many dollars as possible? 4. What is the area of a circle with a diameter of 12 inches? Note: Area of a circle = 2². (Remember import math is needed to use special math values and functions in Python.) 5. Find the length of one leg of a right triangle if the other leg is 12 cm and the hypotenuse is 15 cm. Note: Use Pythagorean's Theorem. In a right triangle with legs a and b, and hypotenuse c, a² + b² = c². (Remember import math is needed to use special math values and functions in Python.) 7 15 cm 12 cm

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 15SA
icon
Related questions
Question

Hello help me with these Python homeworks, please.

C. Download the file <Lab2-wordproblems.py> from the Lab 2 drop box in D2L. Write a script
that will report answers to the problems below.
O Provide code for your answer after each problem.
o After running your script, your answers should be in complete sentences.
O Use Python to perform all calculations.
O
Provide comments as needed.
O
Save and upload the script to the D2L drop box.
Include a screen capture of your output.
●●
1. Suppose your chickens laid 403 eggs in one week. You put the eggs into cartons, each
holding one dozen eggs. How many full cartons will you have?
2. Joe works a job paying $15/hour and Jill is paid $21/hour at her job. How much will they
earn altogether in one week if Joe works 30 hours and Jill works 20 hours?
3. Elias has 69 quarters. He goes to the bank and trades in four quarters for a $1 bill. How
many quarters will he still have left after trading for as many dollars as possible?
4. What is the area of a circle with a diameter of 12 inches? Note: Area of a circle = ².
(Remember import math is needed to use special math values and functions in
Python.)
5. Find the length of one leg of a right triangle if the other leg is
12 cm and the hypotenuse is 15 cm. Note: Use Pythagorean's
Theorem. In a right triangle with legs a and b, and hypotenuse
c, a² + b² = 2². (Remember import math is needed to use
special math values and functions in Python.)
□
15 cm
12 cm
tub
10
Transcribed Image Text:C. Download the file <Lab2-wordproblems.py> from the Lab 2 drop box in D2L. Write a script that will report answers to the problems below. O Provide code for your answer after each problem. o After running your script, your answers should be in complete sentences. O Use Python to perform all calculations. O Provide comments as needed. O Save and upload the script to the D2L drop box. Include a screen capture of your output. ●● 1. Suppose your chickens laid 403 eggs in one week. You put the eggs into cartons, each holding one dozen eggs. How many full cartons will you have? 2. Joe works a job paying $15/hour and Jill is paid $21/hour at her job. How much will they earn altogether in one week if Joe works 30 hours and Jill works 20 hours? 3. Elias has 69 quarters. He goes to the bank and trades in four quarters for a $1 bill. How many quarters will he still have left after trading for as many dollars as possible? 4. What is the area of a circle with a diameter of 12 inches? Note: Area of a circle = ². (Remember import math is needed to use special math values and functions in Python.) 5. Find the length of one leg of a right triangle if the other leg is 12 cm and the hypotenuse is 15 cm. Note: Use Pythagorean's Theorem. In a right triangle with legs a and b, and hypotenuse c, a² + b² = 2². (Remember import math is needed to use special math values and functions in Python.) □ 15 cm 12 cm tub 10
2
A
B
B
8. What is the output if A is TRUE, B is TRUE, and C is FALSE? (Show your reasoning.)
9. Select different inputs and show the output. (Show your reasoning.)
a. A:
b. B:
c. C:
10. Evaluate (A AND B) XOR (B AND C) when A is TRUE, B is FALSE, and C is FALSE.
606422
11. Are there values of A, B, and C that yield TRUE for: A AND (NOT A OR NOT C)?
Explain.
12. Evaluate: 01001011 OR 10101011
0100|oll
10101011
11101011
13. Evaluate: 11111111 AND 00101101
001 01101
001 01101
14. Evaluate: 11111111 XOR 00101101
Transcribed Image Text:2 A B B 8. What is the output if A is TRUE, B is TRUE, and C is FALSE? (Show your reasoning.) 9. Select different inputs and show the output. (Show your reasoning.) a. A: b. B: c. C: 10. Evaluate (A AND B) XOR (B AND C) when A is TRUE, B is FALSE, and C is FALSE. 606422 11. Are there values of A, B, and C that yield TRUE for: A AND (NOT A OR NOT C)? Explain. 12. Evaluate: 01001011 OR 10101011 0100|oll 10101011 11101011 13. Evaluate: 11111111 AND 00101101 001 01101 001 01101 14. Evaluate: 11111111 XOR 00101101
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning