Question

Python 3, fill out the table (just type)

Fill in the table below just like you did in last weeks lab. For each expression, we would like you to first compute the exp

0 0
Add a comment Improve this question Transcribed image text
Answer #1

thanks for the question, here are the expected Output with explanations

===============================================================================

Expected Output Explanation
min(25,4) = 4 min() function returns the minimum value, here 4 < 25
max(25,4) = 25 max() function returns the maximum value here 25>4
min(25,max(27,4) = 25 first max(27,4) will be evaluated, which returns 27, then min(25,27) will return 25 since 25<27
abs(25) = 25 abs() returns the absolute value, without the sign + or -
abs(-25) = 25 abs() returns the absolute value, without the sign + or -
round(25.6) = 26 round() without the 2nd parameter will round to the closest integer value
round(-25.6) = -26 round() without the 2nd parameter will round to the closest integer value
round(25.64,0) = 26.0 the 2nd parameter used is 0, so it will round it to zero decimals
round(25.64,1) = 25.6 the 2nd parameter used is 1, so it will round to 1 decimal
round(25.64,2) = 25.64 the 2nd parameter used is 2, so it will round to 2 decimal
len(Truth) = 5 len() function returns the total number of characters in a string, there are 5 characters in the sentence 'Truth' so len() returns 5
len(Truth + is + best) = 11 first Truth , is and best will be concatenated, and then len() returns the number of characters in the concatenated string which is 11
Add a comment
Know the answer?
Add Answer to:
Python 3, fill out the table (just type) Fill in the table below just like you...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use the link in the Jupyter Notebook activity to access your Python script. Once you have...

    Use the link in the Jupyter Notebook activity to access your Python script. Once you have made your calculations, complete this discussion. The script will output answers to the questions given below. You must attach your Python script output as an HTML file and respond to the questions below. In this discussion, you will apply the statistical concepts and techniques covered in this week's reading about hypothesis testing for the difference between two population proportions. In the previous week’s discussion,...

  • (Python) Suppose you are a bike shop owner who put together bikes free spare parts. Your...

    (Python) Suppose you are a bike shop owner who put together bikes free spare parts. Your customers come to you with parts they've legitimately) found in their pares, from scrap metalhes, ceand they ask you to build them all the bikes you can make with the parts they give you You build the bikes, charge them a big pile of money for the privilege, and keep the leftover parts for yourself It takes the following parts to create one bicycle...

  • Questin 1 (CO 2) Which of the following is not a valid name in python? last_name...

    Questin 1 (CO 2) Which of the following is not a valid name in python? last_name lastName last name lname Question 2 (CO 3) How many times will “Hello World” be displayed after the following code executes? num=2 while num<12:     print("Hello world")     num+=2 2 12 5 4 Question 3 (CO 1) The following code contains an error, what type of error is it and what line number is it? 1 count=1 2 while count<4 3    print("count = ",...

  • My Python file will not work below and I am not sure why, please help me...

    My Python file will not work below and I am not sure why, please help me debug! ********************************* Instructions for program: You’ll use these functions to put together a program that does the following: Gives the user sentences to type, until they type DONE and then the test is over. Counts the number of seconds from when the user begins to when the test is over. Counts and reports: The total number of words the user typed, and how many...

  • CAN YOU COMPLETE THE QUESTION JUST LIKE FORM BELOW, FILL UP THE BLANK SPACE AND CAN...

    CAN YOU COMPLETE THE QUESTION JUST LIKE FORM BELOW, FILL UP THE BLANK SPACE AND CAN YOU GIVE SOME EXPLANATION TOO. THANK YOU SO MUCH Problem 4-8A (Part Level Submission) The following is Wolastoq Tours Limited's unadjusted trial balance at its year end, November 30, 2018. The company adjusts its accounts annually. Credit Debit $ 15,400 7,840 950 2,400 9,720 21,120 $ 5,280 129,600 Cash Accounts receivable Supplies Prepaid rent Prepaid insurance Equipment Accumulated depreciation equipment Vehicles Accumulated depreciation-vehicles Accounts...

  • please use python and provide run result, thank you! click on pic to make it bigger...

    please use python and provide run result, thank you! click on pic to make it bigger For this assignment you will have to investigate the use of the Python random library's random generator function, random.randrange(stop), randrange produces a random integer in the range of 0 to stop-1. You will need to import random at the top of your program. You can find this in the text or using the online resources given in the lectures A Slot Machine Simulation Understand...

  • Could anyone help add to my python code? I now need to calculate the mean and...

    Could anyone help add to my python code? I now need to calculate the mean and median. In this programming assignment you are to extend the program you wrote for Number Stats to determine the median and mode of the numbers read from the file. You are to create a program called numstat2.py that reads a series of integer numbers from a file and determines and displays the following: The name of the file. The sum of the numbers. The...

  • Calculator Project

    AssignmentYou will be designing a calculator complete with user interface to take input from the user, process a response, and produce the output.Step 1: Present a menuFirst thing you should do is present a menu to the user when your program is first ran. Make sure that the operations match the numbers presented below, otherwise the graders won't be able to grade your program.1. Cartesian distance 2. Vector x matrix 3. Normalize 4. Quit Enter command:You will present the menu and wait for the user to input their...

  • Programming Assignment #2 EE 2372 MAKE SURE TO FOLLOW INSTRUCTIONS CAREFULLY, IF YOU HAVE ANY DOUBTS...

    Programming Assignment #2 EE 2372 MAKE SURE TO FOLLOW INSTRUCTIONS CAREFULLY, IF YOU HAVE ANY DOUBTS PLEASE EMAIL ME! This programming assignment will just be a small extension to programming assignment 1. In the first assignment each of the functions could only take a predefined number of inputs. This time the objective is to be able to complete these functions with any amount of inputs. The user will pass arguments through the command line (this means you will have to...

  • how to find abs error of time 25 ? help me fill out the blanks and...

    how to find abs error of time 25 ? help me fill out the blanks and show calculation of F centripetal... Centripetal Force and Acceleration For a body in motion to ch force on a body is in the sa acceleration in that the speed i direction opposite to that of the velocit undergoing negative acceleration. In thes speed, not direction. In this lab we lo wdy in motion to change either its speed or direction, a force is required....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT