Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Repl.it, create a Python repl with the name lastName U2AE. In your repl, create a Python program that: Has a docstring with the program

Using Repl.it, create a Python repl with the name "lastName U2AE".

In your repl, create a Python program that:

  1. Has a docstring with the program name, your name, the date the file was last updated, and a brief discussion on the purpose of the program, at the top of the file.
  2. Has comments explaining each line of code.
  3. Demonstrates the use of basic Python data types (int, float, str) by assigning values to variables and constants, using the correct naming conventions (e.g., camel type for variable names, upper case for constants).
  4. Use the variables you created in a series of print statements, using expressions comprised of your variables and each of the basic Python operators listed in Table 2-6 of your text. (Please refer to Table 2-6).

Make sure your code runs without logic or syntax errors.

Download your Python file (it will probably have the file name "main.py"). Your computer may say that the file might be harmful, but it is okay to allow the file to be downloaded in this case, you created the file.

Change the name of the file to "lastNameU2AE.py" and upload your file to this assignment. (e.g., bohlerU2AE.py). Please note, you will only be able to upload a file with the ".py" file extension to this assignment.

I have attached a sample file to help you understand what we are looking for in this assignment. You should use other names and values in your examples. You can view this file in one of the IDE you researched, or Notepad++.

image text in transcribed

II II 11 Program: BohlerU2AE.py Author: Dr. Jeff Bohler Last Date Modified: 01/08/2022 The purpose of this program is demostrate the use of Python comments, data types, and operators. # Create some variables firstName = "Jeff" # This is string variable year = 2022 # This is int variable moneyInPocket = 0.75 # This is float variable #Create some constants LASTNAME = "Bohler" # This is string constant CLASS_START = 11 # This is int constant ZERO = 0.00 # This is flost constant # Demonstrate the use of variables, constants, and operators print (firstName + " " + LASTNAME) # Demo string concatenation print (-year) # Demo negation print (year**moneyInPocket) #Demo exponentiation print (CLASS_START * year) # Demo multiplication print (CLASS_START / year) # Demo division print (year // CLASS_START) # Demo quotient print (year % CLASS_START) # Demo modulos print (CLASS_START + year) # Demo addition print (CLASS_START - year) # Demo subtraction

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago