Skip to content

Day 1 | Question 2 | Python 3 Solution #154

Open
@arya-io

Description

@arya-io

image

Need to remove semicolon from the line fact = fact * i;

Final Code:

n = int(input()) #input() function takes input as string type
                 #int() converts it to integer type

fact = 1
i = 1
while i <= n:
    `fact = fact * i
    i = i + 1
print(fact)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions