Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: LCM with recursion ( least common multiple)
Post: RE: LCM with recursion ( least common multiple)

thanks, but our teacher said that reading from file must be in function before return
foxman322 Homework 4 3,084 May-25-2019, 01:48 PM
    Thread: LCM with recursion ( least common multiple)
Post: LCM with recursion ( least common multiple)

When i run this code python shell shows nothing in '2.txt' 2 numbers " 21,53" # least common multiple def lcm(a,b): with open('2.txt') as f: a, b = [int(x) for x in next(f).split(',')] array...
foxman322 Homework 4 3,084 May-25-2019, 12:55 PM
    Thread: Python Finding Prime Factors
Post: Python Finding Prime Factors

code must read number from txt.file a=104 i = 2 while i < a: if a % i == 0: print(i) a /= i else: i += 1 print(a)
foxman322 Homework 1 2,302 Jan-11-2019, 04:13 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020