-2
if __name__ == '__main__':

i = int(input().strip())

f = float(input().strip())

s = input()

b = input().strip()

Assign(i, f, s, b)

I've been given a challenge: Write the function definition for the function 'Assign' the different types of variable in it's parameters to new variables.

What does " if name == 'main': "

Arsalan
  • 23
  • 2
  • 4
    Does this answer your question? [What does if \_\_name\_\_ == "\_\_main\_\_": do?](https://stackoverflow.com/questions/419163/what-does-if-name-main-do) –  Dec 31 '21 at 12:25

1 Answers1

1

i - gets input from the user and make it an int. then use strip to remove spaces

f - gets input from the user and make it a float. then use strip to remove spaces

s - gets input from the user

b - gets input from the user and then use strip to remove spaces

here is some reference for if name == 'main' What does if __name__ == "__main__": do?

Tal Folkman
  • 2,368
  • 1
  • 7
  • 21