X= 2 ; y= 5
x = x + y
print(x)
OUTPUT:
10
q1 = 9; q2 =10; q3 = 9
print ()
OUTPUT
the score of quiz 1 is 8, quiz 2 is 10, quiz 3 is q.
A group of students were monitoring the temperature daily basis over a one-year period to calculate the daily average temperature and the average temperature for the whole year (you may assume a year contain 365 days). Ten readings were taken each day.
i. Write an algorithm for the above task.
ii. Convert the above algorithm (written in part (i)) to a Python program to output the daily average temperature and the average temperature for the whole year.
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine line
Print right half Diamond pattern using for loop in python
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
def new_line():
print('.')
def three_lines():
new_line()
new_line()
new_line()
Write a Python Program to Solve Quadratic Equation
This program computes roots of a quadratic equation when coefficients a, b and c are known.
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The client will request a service from the server and the server will process the service-request and then send a reply to the client.
In 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).
Tasks:
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 2nd 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.
Print out:
1. The Python code for the above tasks and
2. Screen shots of results for tasks (2-6) above.