At the top of each of your scripts, put the following multi-line comment with your information:
'''
Your name as registered, with optional nickname in parentheses
CIS 41A Fall 2021
Unit B, Problem B
'''
This script contains four parts.
"ABC123"
).
Use newline escape characters within a line of haiku
"Type, type, type away. Compile. Run. Hip hip hooray! No error today!"
to a single variable (be sure to add newline escape characters).
This should be done in a single line of code.
Type, type, type away. Compile. Run. Hip hip hooray! No error today!Haiku by Samantha W.
"And now for something completely different"
to
a variable called quote.
"And no"
from the beginning of the quote,
print the results.
"rent"
from the end of the quote, print the results.
"me"
from the middle of the quote, print the results.
"Adnwf
..."
by extracting every other letter, print the results.
"tnere
..." by reversing the quote, print the results.
".~*'"
to a variable called pattern1.
".~*''*~."
.~*''*~..~*''*~..~*''*~..~*''*~..~*''*~.
Use three named "constants" for the following prices:
Small beads have a price of 10.20 dollars per box.
Medium beads have a price of 8.52 dollars per box.
Large beads have a price of 7.98 dollars per box.
Ask the user how many boxes of small beads, how many boxes of medium beads, and how many large beads they need (use the int Built-in Function to convert these values to int).
Print the invoice in the following format:
SIZE QTY COST PER BOX TOTALS Small n x.xx xx.xx Medium n x.xx xx.xx Large n x.xx xx.xx TOTAL xxx.xx
Replace the n and x placeholders with actual numeric data values. Right align all numeric values. All dollar amounts should have two decimal places and should align on the decimal point.
Test your script twice, first with user input of 10 boxes of small beads, 9 boxes of medium beads, and 8 boxes of large beads, and then a second time with user input of 5 boxes of small beads, 10 boxes of medium beads, and 15 boxes of large beads.
Add the following at the end of the script to show your results:
'''
Execution results:
paste execution results here
'''
Submit both your finished py scripts in Canvas, Problem B.