Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

2. Write your own unique Python program that has a runtime error. Do not copy the program from your textbook or the Internet. Provide the following.

  • The code of your program.
  • Output demonstrating the runtime error, including the error message.
  • An explanation of the error message.
  • An explanation of how to fix the error.

1. Copy the countdown function from Section 5.8 of your textbook.


def countdown(n):

   if n <= 0:

     print('Blastoff!')

   else:

     print(n)

     countdown(n-1)

Write a new recursive function count up that expects a negative argument and counts “up” from that number. Output from running the function should look something like this:

>>> count up(-3)

-3

-2

-1

Blastoff!

Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)

If the number is positive, the program should call countdown. If the number is negative, the program should call count up. Choose for yourself which function to call (countdown or count up) for input of zero.

Provide the following.

  • The code of your program.
  • Output for the following input: a positive number, a negative number, and zero.
  • An explanation of your choice for what to call for input of zero.

2. Write your own unique Python program that has a runtime error


  • The code of your program.
  • Output for the following input: a positive number, a negative number, and zero.
  • An explanation of your choice for what to call for input of zero.

Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)


Write a new recursive function count up that expects a negative argument and counts “up” from that number.


Edit,debug and run the given python script files:TPI.py

1. Write both TCP client and TCP server in Python version 3.8 or above.

2. Test the network connectivity between TCP client and TCP server.

3. Import the CSV file into the TCP server.

4. Find the number of rows and columns of the data set, and display the results on the TCP client

machine.

5. Output the 2

nd row on the TCP client machine.

6. Find the averages(mean) of the statistics for NBA players and display the results on the TCP

client machine.


Tic-tac-toe game code in python

n this lab project:You are a given a CSV file, and you should copy the file into some directory on

the server.

Using Python- you will import the CSV file and analyse the data frames (i.e. data structured as

columns and rows). To be able to do this - you need to install “pandas” on Python.

1. Write both TCP client and TCP server in Python version 3.8 or above.

2. Test the network connectivity between TCP client and TCP server.

3. Import the CSV file into the TCP server.

4. Find the number of rows and columns of the data set, and display the results on the TCP client

machine.

5. Output the 2

nd row on the TCP client machine.

6. Find the averages(mean) of the statistics for NBA players and display the results on the TCP

client machine.


LATEST TUTORIALS
APPROVED BY CLIENTS