Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create seperate . py source files for all tasks below Task 1 - Create 4 variables with distinct data types - Output each value to

Create seperate .py source files for all tasks below
Task 1
-Create 4 variables with distinct data types
-Output each value to screen
Task 2
-Ask the user for their favorite number.
-Convert the input into an integer data type
-Output the value to screen
Task 3
-Ask the user for the current price of a eggs at the local supermarket
-Convert the input into a float data type
-Output the value to screen
Task 4
-Ask the user for 2 numbers
-Output the sum, product, quotient and difference of the two numbers
Task 5
-Output your first & last name using the print() method.
-Separate the two texts by a tab character
-Complete this task in two unique, distinct ways
(two print statements, each outputting firstname, tab, lastname in two distinct ways)
Task 6
-Ask the user for a text
-Ask the user for a number
-Typecast the number into an integer
-Output both the text and number using string formatting
Task 7
-Using the plus symbol, add/merge/contact
two strings together
two integers together
two floats together
two boolean values together.
- Use 4 print statements
-Use a multi-line comment to state your observations of the four print statements above.
Task 8
-Using the round() method, round the following float values
1.235 to two decimal places
2.45 to one decimal place
3.97531 to four decimal places
-Using a comment, state your observations

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

Step: 3

blur-text-image

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

What is an input price variance?

Answered: 1 week ago