Picture30.jpg
Blog
Picture36.jpg
Picture36.jpg
Picture8.jpg
Picture8.jpg
Picture23.jpg
Picture23.jpg
Picture19.jpg
Picture19.jpg
Picture4.jpg
Picture4.jpg
Picture5.jpg
Picture5.jpg
Write a program that asks the user to enter a sentence. The…
Write a program that asks the user to enter a sentence. The program should reverse the order of the words in the sentence and display the result. Do not reverse the characters in the words, only the word order. Source Code: def reverse_sentence( 1 ): words = sentence. 2 () reversed_words = 3 [::-1] return ‘ ‘.join( 4 ) user_input = input(“Enter a sentence: “) result = 5 (user_input) print(“Reversed sentence:”, result)
Write a program that displays the following information abou…
Write a program that displays the following information about a movie: Title: Shadows of the Horizon Director: Riley Bennett Release Year: 2015 Genre: Drama Duration: 132 minutes Source Code: # Movie Information Display 1 (“Movie Information”) print(“——————“) print(“Title: Shadows of the Horizon”) print(” 2 “) print(“Release Year: 2015”) print(“Genre: Drama”) 3 (” 4 “)
Write a program that asks the user to enter the radius of a…
Write a program that asks the user to enter the radius of a circle and then calculates and displays the area using the formula: Area = π × r² Use 3.14159 for π. Source Code: # Circle Area Calculator radius = 1 (input(“Enter the radius of the circle: “)) pi = 2 area = 3 * 4 ** 5 print(f”The area of the circle is: {area:.2f}”)