Read all the directions before you start coding! You will create a program, in your IDE, that uses a variable. Define a variable, something like var1. Then assign the number 5 to your variable. If you need help with this refer to the Variable page here in Canvas. This should be the first line of your program and it should look something like this. Use the numeric value of 5 instead of 0: x = 0 Next write code to print the following statement on your screen: My favorite number is 5 You should use the print function (print( "blah blah blah") to do this. Do not code the 5 as a literal ("5"), it should be a number (so no quotes around it). You should use your variable, in a print statement, to print the value, such as: print(“My favorite number is “, number) Where number in the example is your variable name. Using a variable in your print statement makes your statement more robust. If the value changes say to 42 then you don’t have to change your print statement it will display the, correct, new number. Try running your program multiple times changing your number each time. Pay attention to what happens with the output. Name the source code file: yourName_LAB2_1. py. Run the program. Capture the output and save it as an image file named yourName_LAB2_output1.jpg. Continue with this code in problem #2...

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Read all the directions before you start coding! You will create a program, in your IDE, that uses a variable. Define a variable, something like var1. Then assign the number 5 to your variable. If you need help with this refer to the Variable page here in Canvas. This should be the first line of your program and it should look something like this. Use the numeric value of 5 instead of 0: x = 0 Next write code to print the following statement on your screen: My favorite number is 5 You should use the print function (print( "blah blah blah") to do this. Do not code the 5 as a literal ("5"), it should be a number (so no quotes around it). You should use your variable, in a print statement, to print the value, such as: print(“My favorite number is “, number) Where number in the example is your variable name. Using a variable in your print statement makes your statement more robust. If the value changes say to 42 then you don’t have to change your print statement it will display the, correct, new number. Try running your program multiple times changing your number each time. Pay attention to what happens with the output. Name the source code file: yourName_LAB2_1. py. Run the program. Capture the output and save it as an image file named yourName_LAB2_output1.jpg. Continue with this code in problem #2...
- Using Python
O Lab 2: Module 2- Intro to Pytho x
O BothTrustingProcess - Replit
Ô https://tcc.instructure.com/courses/42392/assignments/976544#submit
O DayoftheWeek.py - [CP104-Auth x
M Inbox (405) - jcofield122@gmail x+
In this homework, you will
ents
1. Write a program that utilizes string literals and variables.
2. Differentiate between a literal and a variable.
3. Write a program that calculates the average of multiple values.
NOTES: You will submit two files after completing this homework:
• ONE source files: yourName_LAB2.py
• One image files: jpg. yourName_LAB2_output.jpg.
NOTE: Separate the parts of the lab by outputting the question
and printing a line.
Directions
1. Variables and literals
• Read all the directions before you start coding!
• You will create a program, in your IDE, that uses a variable.
• Define a variable, something like var1.
. Then assign the number 5 to vour variable, If vou need help with this refer to the Variable page here in Canvas. This should be the first line of your program and it should look something like this. Use the numeric
value of 5 instead of 0:
Variables
X = 0
• Next write code to print the following statement on your screen: My favorite number is 5
• You should use the print function (print( "blah blah blah") to do this.
• Do not code the 5 as a literal ("5"), it should be a number (so no quotes around it).
• You should use your variable, in a print statement, to print the value, such as:
print("My favorite number is ", number)
• Where number in the example is your variable name.
• Using a variable in your print statement makes your statement more robust. If the value changes say to 42 then you don't have to change your print statement it will display the, correct, new number. Try running
your program multiple times changing your number each time. Pay attention to what happens with the output.
• Name the source code file: yourName_LAB2_1. py.
• Run the program.
- Capture the output and save it as an image file named yourName_LAB2_output1.jpg.
• Continue with this code in problem #2.
Transcribed Image Text:- Using Python O Lab 2: Module 2- Intro to Pytho x O BothTrustingProcess - Replit Ô https://tcc.instructure.com/courses/42392/assignments/976544#submit O DayoftheWeek.py - [CP104-Auth x M Inbox (405) - jcofield122@gmail x+ In this homework, you will ents 1. Write a program that utilizes string literals and variables. 2. Differentiate between a literal and a variable. 3. Write a program that calculates the average of multiple values. NOTES: You will submit two files after completing this homework: • ONE source files: yourName_LAB2.py • One image files: jpg. yourName_LAB2_output.jpg. NOTE: Separate the parts of the lab by outputting the question and printing a line. Directions 1. Variables and literals • Read all the directions before you start coding! • You will create a program, in your IDE, that uses a variable. • Define a variable, something like var1. . Then assign the number 5 to vour variable, If vou need help with this refer to the Variable page here in Canvas. This should be the first line of your program and it should look something like this. Use the numeric value of 5 instead of 0: Variables X = 0 • Next write code to print the following statement on your screen: My favorite number is 5 • You should use the print function (print( "blah blah blah") to do this. • Do not code the 5 as a literal ("5"), it should be a number (so no quotes around it). • You should use your variable, in a print statement, to print the value, such as: print("My favorite number is ", number) • Where number in the example is your variable name. • Using a variable in your print statement makes your statement more robust. If the value changes say to 42 then you don't have to change your print statement it will display the, correct, new number. Try running your program multiple times changing your number each time. Pay attention to what happens with the output. • Name the source code file: yourName_LAB2_1. py. • Run the program. - Capture the output and save it as an image file named yourName_LAB2_output1.jpg. • Continue with this code in problem #2.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education