• Register

Recent questions tagged input-output

0 votes
1 answer 5 views
looking for someone to tell how linux works: what every superuser should know
asked Jan 25 waji 1.9k points
0 votes
1 answer 10 views
Problem: i get this error message Traceback (most recent call last): File "maximumdraws.py", line 13, in <module> fptr = open(os.environ['OUTPUT_PATH'], 'w') File "/home/inindekikral/anaconda3/lib/python3.6/os.py", line 669, in __getitem__ raise KeyError(key) from None KeyError: 'OUTPUT_PATH' My Operation System is Linux Mint 19 Cinnamon. What i have to do?
asked Jan 24 Mashhoodch 9.9k points
0 votes
1 answer 6 views
Problem: why the default implementation is useless (it&rsquo;s hard to think of one which wouldn&rsquo;t be, but yeah) __repr__ goal is to be unambiguous __str__ goal is to be readable Container&rsquo;s __str__ uses contained objects&rsquo; __repr__
asked Jan 9 Mashhoodch 9.9k points
0 votes
1 answer 32 views
Problem Hey, what is the difference between null and null pointer. Answer me with the help of an example.
asked Dec 17, 2020 chris jordan 2.4k points
0 votes
1 answer 15 views
it will be of great help ,if you define what is __repr__ in python...
asked Nov 3, 2020 user1 160 points
0 votes
0 answers 31 views
I saw this code to find difference between diagonal sums of a square matrix. #!/bin/python3 import math import os import random import re import sys def diagonalDifference(arr): d1=0 d2=0 a=n-1 print(arr[1][1]) for i in range(0,n): d1+=arr[i][i] ... ['OUTPUT_PATH'], 'w') with fptr = sys.stdout, the output shows no difference. What then is the difference between functions of these two statements?
asked Oct 29, 2020 psandprop 2.4k points
0 votes
1 answer 69 views
Problem: Hello! My question is that what is endl and what is the difference between endl and \n in c++?
asked Oct 14, 2020 Code Learner 6.2k points
0 votes
2 answers 10 views
Problem: I am facing this error while practicing some c++ related input-output statements. I really don't know why I am facing this error as according to me this suppose to be the syntax of the header file.
asked Oct 12, 2020 anonymous
0 votes
1 answer 13 views
Problem: Hello everyone, I am new to the programming I just want to know why we use header files and we are using iostream header in every other code file.What it has to do with my code. Thanks
asked Oct 12, 2020 SapperIt 1.2k points
0 votes
2 answers 177 views
1 vote
1 answer 72 views
Problem: Hello guys, I have a chunk of a python script that is written by me. I am trying to import the StringIO module in my script but it is not working in my case. Here is my sample script: import StringIO n = "1 3\n 4.5 8" numpy.genfromtxt(io. ... from the previous python version (regarding my codes sample) let me know that too. I seek help from you. Thanks for your kind concern. Thanks.
asked May 14, 2020 adamSw 11.3k points
1 vote
1 answer 152 views
Problem: I wrote a program that asks the user to enter the amount of a purchase and then it sums up the total bill with 15% vat and 0.07% service tax. I wrote the program in python: vat = 0.15 sales_tax = 0.075 product_price = float(input("Please enter the ... not defined I can not solve this thing. I am new in python programming language so please help me to solve this error. Thanks in advance.
asked May 6, 2020 samhaz 5k points
1 vote
1 answer 31 views
Problem: Hello, I was trying to compile my java code but it throws me an error below: invalid escape sequence (valid ones are \b \t \n \f \r \ \' \\ )" It happened when I was trying to taking input by a Scanner class in my code. I am really ... here? I must appreciate your help. Here is the code snippet: InputReader job = new InputReader (new InputReader("\My Documents\job\jobfile.txt")); Thanks.
asked Mar 20, 2020 Gavin 15.3k points
1 vote
1 answer 252 views
Problem: Hello all, I am a new, college student who is learning python programming. I am thinking to write a program that will input a text file and read all the vowels from it and determines when it comes to the end of the file. So, is it possible to create a while loop that determines when the end of a file has been reached? Thanks in advance.
asked Mar 16, 2020 Gavin 15.3k points
1 vote
1 answer 756 views
Problem: Hello Pal, I have a query regarding the python programming language. The question is, which method will return an empty string when it has attempted to read beyond the end of a file? Do you have any idea about this? Thanks
asked Mar 16, 2020 Gavin 15.3k points
1 vote
1 answer 98 views
Problem: Hello people I am doing python programming for a few days. I am still learning. Could anybody please help me by showing how can I import a text file and read five lines from it by my python program? If possible make it as easy words as possible for me. Thanks.
asked Mar 11, 2020 Gavin 15.3k points
1 vote
1 answer 31 views
Problem: Is there any simple way to read the whole ASCII file into std::string in C++:? Thanks
asked Mar 9, 2020 Gavin 15.3k points
To see more, click for the full list of questions or popular tags.