Editing Community Data Science Course (Spring 2023)/Week 1 coding challenges
From CommunityData
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 15: | Line 15: | ||
=== #1.1 Compute the total volume === | === #1.1 Compute the total volume === | ||
Write some Python code to include the basic proportions in three variables <code>cups_of_flour</code> | Write some Python code to include the basic proportions in three variables <code>cups_of_flour</code> set to 2 and 1/4, <code>cups_of_sugar</code> set to 1/2 and <code>cups_of_butter</code> set to 1. | ||
Now have your program print the total volume of shortbread dough with line that says something like <code>the total volume is SOMENUMBEROF cups"</code> (but please replace SOMENUMBEROF) with whatever the real number is. And make sure you use variables! Don't just type the numbers in! | Now have your program print the total volume of shortbread dough with line that says something like <code>the total volume is SOMENUMBEROF cups"</code> (but please replace SOMENUMBEROF) with whatever the real number is. And make sure you use variables! Don't just type the numbers in! |