CYB130 UOPX Individual: Data Types

User Generated

tof411

Programming

Description

One of the most common data types in all programming languages is Float, which represents decimal values.

Programming declares variables and specifies the data types of these variables at the beginning of a program.

However, depending on the order of operations, the output of an operation involving floating numbers might not necessarily be a floating number.

Input the following in JES or Python IDLE to see the output (hereafter, JES will be used in the course but is interchangeable to Python IDLE, whichever the student downloaded):

  • print 1.0 / 3
  • print 10 + 3 * 7
  • print (10 + 3) * 7

Zip your Python .py file and submit the.zip file so the code can be validated.

Write a 1/2 page on why each of your three inputs resulted in its particular output.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

check it.

In python, don’t have to declare the variable type. It recognizes automatically if are working with floats,
integers, strings, etc. The first case...


Anonymous
Awesome! Made my life easier.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags