You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'''n=int(input("Enter how many numbers you want to add"))
l1=[]
oddsum=0
evensum=0
for i in range(1,n+1):
j=print("Enter a number")
l1.append(j)
if j%2==0:
evensum+=j
else:
oddsum+=j'''
'''a="Python Exercises Practice Solution Exercises"
b=a.split(" ")
l1=[]
for i in b:
if i not in l1:
l1.append(i)
for j in l1:
print(j,end=" ")
'''
'''name = "Manush"
age = 22
print(f"My name is {name} and I am {age} years old.")
'''
'''a=input("Enter a string:")
count=0
word=a.split()
ans=''
for i in word:
s1=''
for j in i:
if(s1.count(j)==0):
s1+=j
ans+=s1
ans+=' '
print(ans)
'''
'''a=input("Enter a string:")
count=0
word=a.split()
s1=''
for i in word:
if i not in s1:
s1+=i + ' '
print(s1)
'''
# Consider an algorithm that takes as input a positive integer n. If n is even, the algorithm divides it by two, and if n is odd, the algorithm multiplies it by three and adds one. The algorithm repeats this, until n is one. For example, the sequence for n=3 is as follows: