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

# You work at a low latency trading firm and are asked to deliver the order book data provided in order_book_data.txt to a superior

# The problem is that the data isn't formatted correctly. Please complete the following steps to apropriately format the data

1. Open order_book_data.tx

3. Get rid empty lines

4. Get rid of spaces

5. Notice that there are two currencies in the order book; USD and YEN. Please convert both the Bid and Ask price to USD

6. Create a header line ['Symbol,Date,Bid,Ask']

7. Save the header line and properly formatted lines to a comma seperated value file called mktDataFormat.csv


Write a program to print W pattern of N lines using a asterisk(*) character


NOTE : There is a space after each asterisk (*) character.



Input:


The first line is an integer N



Explanation:


For N=5


The output should be


* * * * * * * * *


* * * * * * * *


* * * * * *


* * * *


* *

program to print the first prime numbers in the given input


Sample Input 2

4

2

3

5

7

Sample Output 2

2


Sample Input 1

5

1

10

4

3

2

Sample Output 1

3



can i get coode for this the above code is not working for both cases



program name: String lookup

input: plays

3

Raju is going to school

Teja plays cricket

car has four wheels


output: 2


Enter integer here: 5

. . . . 0 . . . .

. . . 0 0 0 . . .

. . 0 0 0 0 0 . .

. 0 0 0 0 0 0 0 .

0 0 0 0 0 0 0 0 0

. 0 0 0 0 0 0 0 .

. . 0 0 0 0 0 . .

. . . 0 0 0 . . .

. . . . 0 . . . .


can i get code for this please,

using for loop


write a python function that accepts the value of two integers a and b and produces the output as (a+b)/(a-b). As he is still a kid, hence might not be able to enter the values correctly. Write a python function Divide_Op(a,b) (Refer RollNo_W10A_3.py) which produces the appropriate output or error message by handling all possible exceptions.

writing a python function Add_Values(a,b) (Refer RollNo_W10A_2.py)which takes either two integer or float or string input parameters and perform addition/concatenation if the type of both parameters is the same otherwise give an exception as shown in the example.

write a python function Check_Exception(index, *list)(Refer RollNo_W10A_1.py) which accepts an index value to access the list element and a list composed of numbers. Your function should produce the required element while taking care of the following cases via exception handling as shown in the example.



When the given index value is out of range on the input list.


When the index value is not an integer.


When no value is provided.

Given an integer N, write a program to print a number diamond of 2*N-1 rows as shown below.



Explanation:



In the given example,the number of rows in the diamond is 4.



So,the output should be



. . . 0 . . .



. . 0 0 0 . .



. 0 0 0 0 0 .



0 0 0 0 0 0 0



. 0 0 0 0 0 .



. . 0 0 0 . .



. . . 0 . . .





Given a integer N as a string number and K as input, write a program to print a number pyramid of K rows



Input


The first line of input is an integer N


The second line of input is an integer K



If N=10,K=5


The output should be


10


11 12


13 14 15


16 17 18 19


20 21 22 23 24