• Post author:
  • Post category:Blog
  • Reading time:1 mins read
  • Post last modified:June 12, 2024

What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively?

x = int(input())
y = int(input())

x = x / y
y = y / x

print(y)
  • 8.0
  • the code will cause a runtime error
  • 4.0
  • 2.0
    Options 1 is the answer
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments