answersLogoWhite

0

in python 3 basic input and output are achieved with

string = input("prompt>")

and

print("something")


In python 2 you have


string = raw_input("prompt>")

and

print "something"



User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is printing out and inputting variable in C programming?

input and output


What is the meaning of print and input in idle python?

"print" will output a value onto the screen for a user to see. "input" or "raw_input" gets a user's input.


Which is the base class for all derived classes in input output programming?

ios_base


How do you check input and output in PLC?

You can check the input and output in PLC by using the force command. Through the programming instrument the input can be forced opened or forced closed depending on what the status of the contacts are set to. This can also be done with the output contacts.


How are input and output functions are accessed in C programming?

The most common way to invoke an input/output function is calling it by its name. Example with function puts:puts ("Hello world");


15 examples of both input and output?

To provide 15 examples of both input and output, we can consider a variety of contexts such as programming, natural language processing, and data conversion. For instance, in a programming context, an input could be a string "Hello", and the output could be its length, which is 5. Similarly, for a data conversion example, an input of "100" (in binary) would output "4" (in decimal). If you need specific examples in a particular domain, please let me know!


Is scratch the computer programme a input or output device?

Scratch is not an input or output device; it is a visual programming language and online community designed for creating interactive stories, games, and animations. Users input commands and code through a graphical interface, which allows them to create projects that can produce visual and audio output. Essentially, Scratch serves as a platform for programming rather than a physical device.


Computer programs perform what three steps?

1. Input is received. 2. Some process is performed on the input. 3. Output is produced. Source: Starting out with Python by: Tony Gaddis


What is boolean in programming?

Boolean is a 'true or false' logic in programming - if you define a function as a Boolean function, the only inputs it can have are true or false, and the output will vary dependant on the input


How do you do a ''not'' box?

A "not" box, often used in logic and programming, represents a negation. To create one, you typically take a Boolean expression and invert its value; for example, if the expression is true, the "not" box will output false, and vice versa. In programming, this can be implemented using the logical NOT operator, often represented as ! in languages like C or Java, or not in Python. Visually, a "not" box can be depicted as a box with an input line leading to it and an output line indicating the negated result.


Is an OMR an input or output?

is an omr and input or output device?


Is interactive whiteboard an input or output device?

both input r output