Question: Im using python, please make sure the code runs, and please answer part 1 and 2. 1. Write a program that assigns a string to

 Im using python, please make sure the code runs, and please
Im using python, please make sure the code runs, and please answer part 1 and 2.

1. Write a program that assigns a string to the variable called phrase and then transforms phrase into a hashtag. In other words, all words in phrase are capitalized, all spaces are removed, anda # appears in front. Store the result in a variable called hashtag . Then print the value of both phrase and hashtag. Your program should start with phrase = 'Things you wish you knew as a freshman and the output from the program (using print) function calls) should be The phrase "Things you wish you knew as a freshman" becomes the hashtag "#ThingsYourlishYouknewASAFreshman.. Note that the output includes the quotation marks. 2. One of the challenges of programming is that there are often many ways to solve even the simplest problem. Consider computing the area of the circle with the standard formula Fortunately, we now have pi from the math module, but to compute the square of the radius we now can useor pow) or we can just multiply the radius times itself. To print the area accurate to only a few decimal places we can now use the string format) method or the roundC) built-in function, which includes an optional second argument to specify the number of decimal places. Write a short Python program that computes and prints the areas of two circles, one with radius 5 and the other with radius 32Your code must use .. once and pow( ) once and it must use foreat) once and round) once. The output should be exactly Area 1 -78.5 Area 2-3216.99

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!