Computer Science, asked by hemnarayan7010, 10 months ago

Write any Python expression which is a valid input argument to the following program?
input = eval(raw_input(‘Value:’))
print ‘You typed’, value

Answers

Answered by STEVEMCQEEN
0

Answer:

a=input('enter your word')

a=('you typed')

print(a)

Answered by mad210219
1

Given:

input = eval(raw_input(‘Value:’))

print ‘You typed’, value

To find:

any Python expression which is a valid input argument to the following program

Solution:

Type the code in python compiler:

Value=eval(int(input(“enter a value”))

Print(‘you typed’,Value)

OUTPUT:

enter a value 2+3*4

You typed 14  

Is the output

Eval() function in python evaluates any expression as usual as addition,subtraction,division,multiplication.

So the given input should be an expression

The expression is taken as input to eval() function and stored in calue variable

Eval()

Computer

2+3*4 as  

2+12

=14

So the output is 14

Similar questions