Question
Need Question 6 answered WRITE SHORT PYTHON SCRIPTS FOR EACH OF THE QUESTIONS BELOW PLEASE NOTE THAT YOU MUST RUN EACH SCRIPT AND GET A
Need Question 6 answered
WRITE SHORT PYTHON SCRIPTS FOR EACH OF THE QUESTIONS BELOW PLEASE NOTE THAT YOU MUST RUN EACH SCRIPT AND GET A SCREEN DUMP OF THE RESULT. CROP IT AND GET them into a Word document and post it on blackboard. Number them correctly. Submit the script (.py file) also in blackboard. 1. Type the following text into a single file named firstex1.py. print "Hello World!" print "Hello Again" print "I like typing this." print "This is fun." print 'Yay! Printing.' print "I'd much rather you 'not'." print 'I "said" do not touch this.' Open a regular DOS shell. CD to the folder you saved the firstex1.py file. Then type python firstex1.py [Crop the area (With the command you just typed), and the result and paste it to the word document] 2. Find a quote that you like. Store the quote in a variable, with an appropriate introduction such as "Ben Franklin said, 'A father's a treasure; a brother's a comfort; a friend is both.'.". Print the quote. [NOTE: All special characters, single quotes inside the statement must be printed. 3. a. Store your first name in lowercase, in a variable. b. Using that one variable, print your name in lowercase, Titlecase, and UPPERCASE. 4. Store your first name and last name in separate variables, and then combine them to print out your full name. 5. Print a series of 5 informative statements, such as "The result of the calculation 5+7 is 12." Where 12 is the addition of 5 and 7. The 5 and 7 must be in two different variables and 12 must be calculated by the program and not hard coded. Use other operators such as -, *, /, % etc. to make the others. The one shown above is just one example. 6. Write a program that asks the user for his/her favorite color. Create the following output (assuming "red" is the chosen color). red red red red red red red red red red red red red red red red red red red red red red red red
WRITE SHORT PYTHON SCRIPTS FOR EACH OF THE QUESTIONS BELOW PLEASE NOTE THAT YOU MUST RUN EACH SCRIPT AND GET A SCREEN DUMP OF THE RESULT. CROP IT AND GET them into a word document and post it on blackboard. Number them correctly. Submit the script .py file) also in bl rd 1. Type the following text into a single file named firstex1.py print "Hello World! print "Hello again" print "I like typing this." print "This is fun." print Yay! Printing. 'not.* print 'I "said" do not touch this. PEL int "I'd much rather you Open a regular DOS shell. CD to the folder you saved the firstex1.py file. Then type python firstex1.py nd word documentl 2. Find a quote that you like. Store the quote in a variable, with an appropriate introduction such as "Ben Franklin said, 'A father's a treasure; a brother's a comfort; a friend is both..". Print the quote. [NOTE: All special characters, single quotes inside the statement must be printed 3- a. Store your first name in lowercase, in a variable. 4. Store your first name and last name in separa 5. Print a series of 5 informative statements, such as b. Using that one variable, print your name in lowercase, Titlecase, and UPPERCASE bles, and then combine them to print out your full name. "The result of the calculation 5+7 is 12." Where 12 is the addition of S and 7.The 5 and 7 must be in two different variables and 12 rnust be calculated by the prograrn and not hard coded. Use other operators such as-../, % etc. to make the others. The one shown above is just one example. Write a program that asks the user for his/her favorite color. Create the following output (assuming "red" is the chosen color). 6. red red red red red red red red red red red red red red red red red red red redStep 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