Part 2 | Lists,Control Statements | Python Malayalam Tutorial For Beginners
Вставка
- Опубліковано 19 чер 2020
- 24/7 FREE Telegram Support! Sign Up Now:
study.brototype.com/pythondev...
Best Malayalam python tutorial.
Link to 100K Coding Challenge:
• 100K Coding Challenge
Link to part 1 video: • Part 1 | Introduction ...
00:45 List
09:17 control statements
09:56 if sample program
16:08 while Loop
21:19 for Loop
26:46 Range
27:39 multiplication Table printing
29: 42 Break, continue
About us:
Subscribe to Kerala's top tech-career UA-cam channel and gain access to free programming tutorials and tech-career videos in Malayalam. This channel will help you gain skills and knowledge to build a high-income career in the IT field.
Enroll in our 7-month offline training program, 'Brocamp', to learn coding and other skills in an office environment by paying the training fee after placement.
To know more about Brocamp, Visit:
brototype.com/brocamp/
For any inquiries & updates:
Call/Whatsapp us at 7034395811
► Connect with Nikhil Kilivayil: nikhilkiliv...
Connect on Linkedin: / nikhilkilivayil
► Follow Brototype on Instagram: brototype.m...
► Follow Brototype on Linkedin: / mycompany
we can replace the characters in the string
eg: a="Hello world"
print(a.replace("H", "j"))
Yes
good ithe njan w3school kandu
@@muhsikondottymk4795 കോപ്പി അടിച്ചു അല്ലേ?
@@muhsikondottymk4795 njanum aa schoolil kanditund.....athentha patillanu paranjath
menu ={1:'Tea', 2:'Coffe', 3:'Lime', 4:'Shake' }
print(menu)
choice = int(input('Enter your choice: '))
if (choice>4) or (choice
#if dict_name={1:"hero"} print(dict_name.keys()) gives the keys in a dictionary
# out put : 1
menu ={1:'Tea', 2:'Coffe', 3:'Lime', 4:'Shake' }
print(menu)
choice = int(input('Enter your choice: '))
if choice not in menu.key() :
print("invalid Choice")
else :
print("You have odered: "+menu[choice])
# Function to demonstrate printing pattern triangle
def triangle(n):
# number of spaces
k = 2 * n - 2
# outer loop to handle number of rows
for i in range(0, n):
# inner loop to handle number spaces
# values changing acc. to requirement
for j in range(0, k):
print(end=" ")
# decrementing k after each loop
k = k - 1
# inner loop to handle number of columns
# values changing acc. to outer loop
for j in range(0, i + 1):
# printing stars
print("* ", end="")
# ending line after each row
print("
")
# Driver Code
n = 5
triangle(n)
Num=int(input("Multiplication table: "))
for i in range(1, 11):
print(Num, ' ×', i, '=', Num*i)
list = {"1: biriya 2: porotta 3: chapatti 4: alfam"}
print(list)
choice=int(input("chhoice an item"))
if choice == 1:
print("ur selected biriyanoi")
elif choice == 2:
print("ur choce poratta")
elif choice==3:
print("ur choice is chappati")
elif choice==4:
print("u choouce alfam")
else:
print("wrong choice")
Bro list upayogikkatheyy ummm chyyaammm
I spend lot of time for multiplication
Later u did that in a single step 😃
Nothing to say
Perfect ok
28:13
num=int(input("Enter a number to print its multipiction table:"))
end=int(input("Till how many numbers you need multiplication table of "+str(num)+":"))
for x in range(1,end+1):
print(str(num) + "x" + str(x) + "=" + str(num * x))
x=int(input("enter multiplication table required"))
y=int(input("enter range required"))
for y in range (1,y+1):
print(x*y)
You are a great tutor sir...thank you so much for your every tutorial videos
❤️
30 minutes nte ee video kandittum cheythittum kazhiyumbol 2 hours eduthu....
Good teaching sir....
👍
row=int(input("Enter the row:"))
a=" * "
count=1
while row>0:
print(" "*row+a *count)
row=row-1
count=count+1
else:
print("Pyramid is NOT print.... ")
menu=["1 for puttu", "2 for cutlet", "3 for jamun", "4 for biriyani", "5 for neychor"]
for x in menu:
print(x)
menu=int(input("enter your choice"))
if menu==1:
print("you have selected puttu")
elif menu==2:
print("you have selected cutlet")
elif menu==3:
print("you have selected jamun")
elif menu==4:
print("you have selected biriyani")
elif menu==5:
print("you have selected neychor")
else:
print("not available")
num=int(input("Enter the multipled number:"))
for i in range(1,11):
value=num *i
print(i ,"x", num ,"=",value)
Multiplication Table
digit = int(input("Enter a number for generating multiplication table: "))
limit = int(input("Enter the limit: "))
for x in range(1,limit+1):
print(str(digit)+" * "+str(x)+" = "+str(digit*x))
num=int(input("enter the number"))
for x in range(1,11):
print(x*num)
a=int(input("Enter a Number :"))
for i in range(1,11):
print(a, 'x', i, '=', a*i)
foodmenu =["1: mandhi","2: biriyani","3: sulaimani","4: chapathi","5: porotta"]
print(foodmenu)
item= int(input())
if ((item0)):
print(foodmenu[item-1])
else:
print("invalid seelection")
menu=["1.oonu","2.biriyani","3.chicken","4.porotta"]
print(menu)
list=int(input("select item"))
if list==1:
print("selected item is oonu")
elif list==2:
print("selected item is biriyani")
elif list==3:
print("selected item is chicken")
elif list==4:
print("selected item is porotta")
else:
print("wrong")
row = int(input('Enter limit?'))
num = int(input('which number?'))
for x in range(1,row + 1):
print(str(x) + "*" + str(num) + "=" + str(num * x))
num=int(input("multiplication table of"))
a=int(input("till where"))
a=a+1
for x in range(1,a):
print(num," x ",x, "=",num*x)
a=int(input("Enter the number"))
b=int(input("enter the limit"))
for x in range(1,b+1):
print(x, 'x', a, '=', (a*x))
Multiplication table:
Num= int(input("enter the number"))
r=int(input("enter the limit'))
for i in range(r) :
n=int(i*Num)
print(str(i)+"*'+str(Num)+"="+str(n)
size = int(input("enter number of rows"))
m = (2 * size) - 2
for i in range(0, size):
for j in range(0, m):
print(end=" ")
m = m - 1
for j in range(0, i + 1):
print("* ", end=' ')
print(" ")
a=int(input("Enter a number: "))
print("table of "+ str(a) +" : ")
for x in range(1,11):
res = a*x
print (str(a)+" * "+str(x)+" = " + str(res))
Pyramid using for loop
n = int(input("enter the limit"))
res = ""
c = 1
for i in range(1 , n+1):
for j in range(i , n + 1):
if j < n:
res = res + " "
else:
for k in range(1 , c+1):
res = res + "* "
c = c + 1
res = res + "
"
print(res)
Pycharm application engane reopen paranjutharamo?
number=int(input("Multiplication table of which number?"))
count=int(input("where it is stop?"))
for i in range(count):
print(str(i+1) + " X " + str(number) + " = " + str(number*(i+1)))
mul=int(input ("enter a number to display the multiplication table:"))
last=int(input("enter the last point:"))
for i in range(1,last+1):
print(i , "*", mul, "=" ,i *mul)
multiplication table
multiplier=int(input("multiplication table of which number"))
number=int(input("lenghth of the table"))
for i in range(number):
print(multiplier,"*",i,"=",multiplier*i)
row = int(input("Enter no of rows : "))
a = " * "
stars_count = 1
while row > 0:
print(" " * row + a * stars_count)
row -= 1
stars_count += 1
OUTPUT
Enter no of rows : 5
*
* *
* * *
* * * *
* * * * *
Process finished with exit code 0
0
Star count usage onnu parayuo
@@abhinavvt7963 to print stars in each row.
@@bijithrabm1839 hey
multiple = int(input('Which numbers Multiplication table you needed :'))
lines = int(input('To how much you need the table of ' + str(multiple) + ' :'))
for x in range(1, lines + 1):
print(str(x)+' x '+str(multiple)+' = '+str(multiple*x))
For Loop -MP4
def print_triangle(rows):
for i in range(1, rows + 1):
print(" " * (rows - i) + "*" * (2 * i - 1))
# Example usage:
try:
num_rows = int(input("Enter the number of rows for the triangle: "))
print_triangle(num_rows)
except ValueError:
print("Please enter a valid integer.")
num = int(input("enter a number"))
for i in range (1,11):
print(num,'x',i,'=',num*i)
Sir program to print the multiplication Table:
num = int(input("Enter the number: "))
n = int(input("Enter Range"))
print("Multiplication Table of", num)
for i in range(1, n+1):
print(num,"X",i,"=",num * i)
Congratulations, you are selected for the cash award. Please contact us on Crossroads Instagram page instagram.com/crossroads.official
congrats bro 👏👏
Programming for * pyramid ::
i=1
n=5
while i
problem related with Hotel ordering Menu:
print("Menu for today are:", end="
")
print("1.Porotta", "
""2.Biriyani", "
""3.Fried rice","
""4.Shawarma",end="
")
menu=int(input("Choose the number for order: "))
if menu==1 :
print("You ordered Porotta")
elif menu==2 :
print("You ordered Biriyani")
elif menu==3 :
print("You ordered Fried rice")
elif menu==4 :
print("You ordered Shawarma")
else :
print("You are a fool")
number = int(input ("Enter the number multiplication table: "))
l= int(input ("Enter the limit"))
for i in range(1, l+1):
print(i, 'x', number, '=', number*i)
Multiplication table
a=int(input ("enter the number")
for x in range(0,11):
print(a,"*",x,"=",x*a)
#multiplication table
num=int(input('which numbers mutipliacation table yout want'))
limit=int(input('enter the limit of the table'))
for x in range(1,limit+1):
print(end=' ')
sum=x*num
print(x,'*',num,'=',sum)
value=int(input('Which multiplication Table you need?'))
num=int(input('Limit of multiplication table number'))
for i in range(1,num+1):
print(str(value)+' X '+ str(i)+ '= ',value*i)
n = int(input("enter a number for multiply"))
For x in range(1, 11):
Print(n, "*", x,"=", n *x)
print("WELCOME")print("1 is porotta","
""2 is biriyani","
""3 is dosa","
""4 is mandhi","
""5 is masala dosa")c=int(input ("enter any menu"))if c==1:print("porotta ready")elif c==2:print("biriyani ready")elif c==3:print("dhosha ready")elif c==4:print("mandhi ready")elif c==5:print("masala dosa ready")else:print("your not selected")
..... Multiplication Table ....
def mtb(num,r):
for x in range(1,r+1):
ans= x*num
print(f' {x} x {num} = {ans}')
num=int(input("Mutiplication table of : "))
r= int(input("End or range of table : "))
mtb(num,r)
pyramid
num = int(input(print("enter length of ur pyramifd")))
for i in range(0, num):
for j in range(0, num - i - 1):
print(end=" ")
for j in range(0, i + 1):
print("*", end=" ")
print()
num=int(input("Enter the number to be multipled :"))
x=int(input("enter range:"))
print("multiplication table of ",num )
for i in range (1, x):
print(str(num)+'X'+str(i)+'='+ str(num*i))
print('["This program is used to print star pyramid"]')
star = 1
shape = ' *'
space = " "
rows = eval(input('Enter no of rows for printing stars :'))
while star 0:
print((space*rows)+(shape*star))
star = star + 1
rows = rows - 1
Star Pyramid program (3 rows):
space=3
row=1
while row
Linux anu coding nu nalla OS enn paranjallo, windows inte kude eathellum linux distros dual boot cheydal lap enthellum kuzhappam varuvo?!
lim=int(input("enter your limit"))
r=int(input("multiplication table of "))
for x in range(lim+1):
if x==0:
x=x+1
print(str(x)+"x"+str(r)+"="+str(x*r))
m = int(input("enter multiplication table u want: "))
n = int(input("enter the range of table: "))
for i in range(n+1):
print(i, "*", m ,"= ", i*m)
item = ["porotta","chappathi","Biriyani","fried Rice","Appam"]
for i in range(len(item)):
print(i+1,""+item[i])
num = int(input("Choose your item: "))
if num in range(1,6):
print("You have selected "+item[num-1])
else:
print("Not available")
menu=['1.Tea', '2.Porota', '3.Appam', '4.Dosa']
for x in menu:
print(x)
order=int(input("PLEASE ENTER YOUR ORDERED FOOD NUMBER"))
if order==1:
print("₹7")
elif order==2:
print('₹20')
elif order==3:
print('₹15')
elif order==4:
print("₹18")
else:
print('invalid order')
# Prompt the user to input a number and store it in the variable 'num'
num = int(input("Enter a Number: "))
# Iterate through numbers 1 to 10 (inclusive)
for mul in range(1, 11):
# Print the multiplication table format for the entered number
# {0} represents 'num', {1} represents 'mul', and {2} represents the result of multiplication
print("{0} * {1} = {2}".format(num, mul, (num * mul)))
i = 1
n = int(input('enter num of rows: '))
first_space = (n-1)
stars = first_space*(' ') +'*'
print(stars)
while i < n:
first_space = first_space - 1
stars = first_space * (' ') + '*' + (i*(' *'))
print(stars)
i = 1 + i
Programming to choose hotel order
menu=["1.chappathi","2.biriyani",
"3tea","chicken"]
print(menu)
a=int(input ("choose an item"))
if a>4 or a
n = int(input("Enter the number of rows"))
a=2*n-2
for i in range(0 ,n):
for j in range(0, k):
print(end=" ")
a=a-2
for j in range(0 , i+1):
print("* ",end=" ")
print()
a = int(input("Enter the number
"))
b = int(input("enter the limit
"))
for x in range(1, b+1):
print(str(x)+ "*"+ str(a)+"=",x * a)
#multiple selection of hotel menu
menu=['1 :mandi','2 :biriyani','3 :sulaimani tea','4 :porotta','5 :beef fry','6 :chicken curry']
print(menu)
item=int (input('select your items'))
if item==1:
print("mandhi")
elif item==2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item==4:
print("porotta")
elif item==5:
print("beef fry")
elif item==6:
print("chicken curry")
else:
print("wrong item")
item=int (input(''))
if item==1:
print("mandhi")
elif item==2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item==4:
print("porotta")
elif item==5:
print("beef fry")
elif item==6:
print("chicken curry")
else:
print("wrong item")
item=int (input(''))
if item==1:
print("mandhi")
elif item==2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item==4:
print("porotta")
elif item==5:
print("beef fry")
elif item==6:
print("chicken curry")
else:
print("wrong item")
item = int(input(''))
if item == 1:
print("mandhi")
elif item == 2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item == 4:
print("porotta")
elif item == 5:
print("beef fry")
elif item == 6:
print("chicken curry")
else:
print("wrong item")
item=int (input(''))
if item==1:
print("mandhi")
elif item==2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item==4:
print("porotta")
elif item==5:
print("beef fry")
elif item==6:
print("chicken curry")
else:
print("wrong item")
item=int (input(''))
if item==1:
print("mandhi")
elif item==2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item==4:
print("porotta")
elif item==5:
print("beef fry")
elif item==6:
print("chicken curry")
else:
print("wrong item")
item=int (input(''))
if item==1:
print("mandhi")
elif item==2:
print("biriyani")
elif item == 3:
print("sulaimani tea")
elif item==4:
print("porotta")
elif item==5:
print("beef fry")
elif item==6:
print("chicken curry")
else:
print("wrong item")
__*Break and Continue Samples*
# Receiving a loop limit
loopLimit = int(input("Enter a loop limit number
"))
# Looping and using break statement
for x in range(0, loopLimit + 1):
if x == 5:
break # When 'break' works in loop loop exits... 1, 2, 3, 4
print(str(x))
# Receiving a loop limit
loopLimit = int(input("Enter a loop limit number
"))
# Looping and using continue statement
for x in range(0, loopLimit + 1):
if x == 5:
continue # When 'continue' works in loop loop skips that line ...1, 2, 3, 4, 6, 7.....
print(str(x))
num = int(input("Enter the Value"))
for i in range (1,11):
print(num,"x",i,"=",num*i)
lim=input("enter the limit")
i=1
x=1
s=int(lim)
while i
Waiting ayirunnu
#Multiplication table
num=int(input("enter the digit"))
for i in range(1, 11):
print(num, 'x', i, '=', num*i)
Multiplication Table:
num = int(input("Enter a number whose multiplication table to be obtained"))
for i in range (1,11) :
print(num, "x", i, "=", num*i )
very nice bro
K=int(input("enter a number to display multiplication table "))
e=int(input(" How much"))
for i in range(e+1) :
num=i×k
Print(num)
pattern printing pyramid
def print_star_pyramid(rows):
# Initialize variables
i = 0
while i < rows:
# Print spaces
j = 0
while j < rows - i - 1:
print(" ", end="")
j += 1
# Example usage
num_rows = 10
star_pattern_pyramid(num_rows)
# Print stars
j = 0
while j
How to write a program that calculates and displays the sum of the first 1000 integers?.Could you please help?
n = int(input("enter a number"))
for x in range(11):
mul = n*x
print(str(n)+"*"+str(x)+"="+str(mul))
print("****simple multiplication table****")
a=int(input("Enter a number for multiplication : "))
b=int(input("Enter another number for range: "))
for i in range(1,b+1):
c=a*i
print(c)
num = int(input ("enter a number"))
for x in range (1,11):
q=(x)
p= (x*num)
print (num, "x", (q),"=",(p))
a=int(input("enter the multiplication table you want:"))
for x in range(1,11):
b=x*a
print(x,'*',a,'=',b)
num = int(input('enter the range'))
i = 0
while i < num:
s = num - i - 1
while s > 0:
print(end=" ")
s = s - 1
m = i + 1
while m > 0:
print("*", end=" ")
m = m - 1
i=i+1
print()
#i=row
#num=no:of rows
#s=spaces
#m=*
#multipication table
a=int(input("Multipication table of :"))
b=int(input("multipication table upto which number: "))
for x in range(b):
print(a,"*", x+1 ,"=", a*(x+1))
i=1
While i
a=int(input("Enter a number: "))
b=int(input("enter the limit"))
print("table of "+ str(a) +" : ")
for x in range(1,b+1):
res = a*x
print (str(a)+" * "+str(x)+" = " + str(res))
num=int(input("Enter a multiplication number
="))
times=int(input("how many times entered number multiplicable
="))
for i in range(times+1):
multi=i*num
print(i,"*",num,"=",multi)
Multiplication table (simple method)
n=int(input("enter the number"))
for x in range (1,11,1) :
print (x, "*", n, "=", x*n)
a=input('enter a number')
if int(a)==1:
print('parotta')
elif int(a)==2:
print('chappathi')
elif int(a)==3:
print('mandhi')
elif int(a)==4:
print('noodles')
*multiplication problem *
n = int(input('which multiple you want '))
h = int(input('how many times you want '))
for i in range(h+1):
print(n*i)
# multiplication table
y=int(input("Enter the number for which you need the multiplication table :"))
z=int(input("Enter upto which limit you want the table :"))
for x in range(z):
print(str(x)+" X "+str(y)+" = "+str(x*y))
# Python Program to print a Triangle
# Ask the Range of the triangle
num = int(input("Enter the range: \t "))
# i loop for range(height) of the triangle
# first j loop for printing space ' '
# second j loop for printing stars '*'
for i in range(num):
for j in range((num - i) - 1):
print(end=" ")
for j in range(i + 1):
print("*", end=" ")
print()
Python program for multiplication table 1 to 10
num1 = 1
num2 = 1
for num1 in range(1, 11):
for num2 in range(1, 11):
product = num1 * num2
print(product)
print("\t")
num2 += 1
print("
")
num1 += 1
pyramid tringle printing using while loop
a = int ( input ( 'Starting from:' ) )
b = int ( input ( 'Ending value:' ) )
while a
Star Pyramid :
print('how many rows ?')
row = int(input())
for i in range(1 ,2 * row ,2 ,):
print(f"{' ' * row}{'*' * i}")
row -= 1
# This code is for getting the multiplication table
number = int(input("Enter the number for which you need the multiplication table: "))
limit = int(input("limit of the multiplication table?: "))
multiplier = 1
for i in range(limit+1):
result = number*multiplier
print(str(number) + " x " + str(multiplier) + " = " + str(result))
multiplier = multiplier+1
num = int(input("enter no of rows : "))
for i in range(1, num + 1):
print(" " * (num - i) + "* " * i)
STAR PROGRAMME
size = int(input("enter number of rows"))
m = (2 * size) - 2
for i in range(0, size):
for j in range(0, m):
print(end=" ")
m = m - 1
for j in range(0, i + 1):
print("* ", end=' ')
print(" ")
#MultiplicationTable
num = int(input("Enter the multiplying number"))
for i in range(1, 11):
print(num, "X", i, "=", i * num)
a=int(input(" enter a number "))
For i in range (1,11):
Print( a , "x" , i , "=" ,a*1)
simple multipication table
i = int(input("Enter the number : "))
r = int(input("Enter the range : "))
for x in range(1,r+1):
mul = x * i
print(str(i) + "x" + str(x) + "=" + str(mul))
print("Avilable dish are ")
food = ["1.porota", "2.biriyani", "3.dosa", "4.alfam", "5.rice samabar"]
if food == 0:
print("Sorry no food avilabe")
else:
print(food)
choice:int = int(input("enter your choice"))
if choice == 1:
print(food[0])
elif choice == 2:
print(food[1])
elif choice == 3:
print(food[2])
elif choice == 4:
print(food[3])
elif choice == 5:
print(food[4])
else:
print("please select the avilabe item")
a = int(input("Enter the number"))
b = int(input("How many times?"))
for i in range(b+1):
product = a * i
print(f"{a} X {i} = {product}")
Count=1
count=Count
inputed_value=int(input("Enter maximum number of stars"))
max_star=inputed_value
while Count=1:
print(" ",end="")
max_star=max_star-1
while count>=1:
print("*",end="")
print(" ",end="")
count=count-1
print()
Count=Count+1
count=Count
max_star=inputed_value
Calculator problem
Number = int(input("Enter the number to show its multiplication table"))
Length = int(input("Enter the length"))
for x in range(Length + 1):
Result = Number * x
print(str(Number), "*", str(x), "=", str(Result))
st = int(input("Enter 1 For Porotta
Enter 2 For Beef
Enter 3 For Mandi
Enter 4 For Rice
Enter 5 For Sambar"))
if st==1:
print("You selected Protta")
elif st==2:
print("You selected Beef")
elif st==3:
print("You selected Mandhi")
elif st==4:
print("You selected Rice")
elif st==5:
print("You selected Sambar ")
else :
print("You have entered invalid number")
print(" Enter 1 for porotta
Enter 2 for chapathi
Enter 3 for mandhi
Enter 4 for biriyani")
a=int(input(" Enter your choice:"))
if a==1 :
print("You have selected porotta")
elif a==2 :
print("you have selected chapathi")
elif a==3 :
print("you have selected mandhi")
elif a == 4 :
print("you have selected biriyani")
else :
print("Enter a valid choice")
num = int(input("Enter a number: "))
len = int(input("how much times need to be calculate"))
for i in range(1, len):
print(f'{num} * {i} = {num * i}')
b=int(input("enter a number"))
print(b, "കണക്കുകൂട്ടല്കണക്കുകൂട്ടല്" )
for x in range(1,11):
c=x*b
print(x,"*",b,"=",c)
for i in range(5):
print(' '*(5-i),'* '*(i+1))
b=int(input ("enter the limit of multiplication table"))
n=int(input ("multiplication table of which number"))
for x in range(b) :
print((x+1),"*",n,"=",(x+1)*)
num = int(input("1 for porotta
2 for biriyani
3 for mandhi
4 for fried rice
Enter your choice"))
if num==1:
print("you have selected porotta") elif num==2:
print("you have selected biriyani") elif num==3:
print("you have selected mandhi")
elif num==4:
print("you have selected fried rice")
else:
print('invalid choice')
vismaya v
menu=["1.oonu","2.biriyani","3.chicken","4.porotta"]
print(menu)
list=int(input("select item"))
if list==1:
print("selected item is oonu")
elif list==2:
print("selected item is biriyani")
elif list==3:
print("selected item is chicken")
elif list==4:
print("selected item is porotta")
else:
print("wrong")