Question
In this assignment, students will do some really basic programming in Python. The idea here is to ensure that students have some of these basics
In this assignment, students will do some really basic programming in Python. The idea here is to ensure that students have some of these basics down before starting to put ideas together to create more- complicated programs. Students should also, through this assignment, start getting a feel for "playing around with code", trying different things to get the output that's been requested.
Write a program called printvars.py that: a. In a comment on the first line gives your full name (first and last). b. Assigns whatever your first name is to a string variable called FirstName. c. Assigns your year of high school graduation to an integer variable called GradYear. d. Assigns the value 2.899 to a float variable called PriceOfGas. e. Prints these three variables together on one line.
2. Write a program called pymath.py that: a. In a comment on the first line gives your full name (first and last). b. Calculates a variable called w that is equal to 14 - 6. c. Prints out a statement that "The value of w is [whatever].". i. If this isn't already clear, rather than printing "[whatever]", the above statement should print out the actual value of w. Do this same thing for x, y, and z below. ii. Use placeholder syntax to insert your variable value into the print statement. d. Calculates a variable called x that is equal to 2 times the sum of 8 and 7. e. Prints out a statement that "The value of x is [whatever].". i. Use placeholder syntax to insert your variable value into the print statement. f. Calculates a variable called y that is equal to the remainder of 15 divided by 4. g. Prints out a statement that "The value of y is [whatever]." i. Use placeholder syntax to insert your variable value into the print statement. h. Calculates a variable called z that is equal to the square root of the product of 6 times 9. i. Prints out a statement that "The value of z is [whatever]!". i. Use placeholder syntax to insert your variable value into the print statement.
I know it's 2 questions but please help me I am broke and stupid.
Step 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