Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 1 1.1 make_flag.py 1. Create a variable star and assign it the value of '*' 2. Create a variable line and assign it a
Assignment 1 1.1 make_flag.py 1. Create a variable star and assign it the value of '*' 2. Create a variable line and assign it a value of 3. Use a loop, conditional statement (s) and the print() function to create the output like below when the script is run 4. Save your script as make_flag.py (ipynb) and submit it to me via direct message on Slack Include your name in the name of the script. Ex: clark assignment1.ipynb Hint: You can use the range() function; the number of iterations in the loop equals the number of lines (5) in the flag make_flag.py output: ****** * ! **** ! * ! 1.2 classify_temperature.py 1. Create a variable temperature that holds the user's input for today's temperature 2. Use conditional statements and the schema below to classify the temperature into Cold, Slippery, Freezing, Comfortable, Warm, and Hot categories. Assign the category to the variable temp_category 3. Use print("Today is ", temp_category, "temperature") to print a phrase like: Today is comfortable temperature 4. Save your script as classify_temperature.py (oripynb if you use Jupyter) and submit it via the direct message on Slack Tips: Don't forget to cast the temperature as ineteger. You might need to use nested if statements. Temperature Classification Schema cold ==> temperatures between 40 and 30 degrees (Fahrenheit) slippery ==> temperatures between 20 and 29 degrees (Fahrenheit) freezing ==> temperatures below 20 (Fahrenheit) comfortable ==> temperatures between 41 and 50 degrees (Fahrenheit) warm ==> temperatures between 51 and 79 degrees (Fahrenheit) hot ==> temperatures above 79 degrees (Fahrenheit)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started