-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode(loops program ) python language.py
More file actions
67 lines (56 loc) · 1.37 KB
/
Copy pathcode(loops program ) python language.py
File metadata and controls
67 lines (56 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
program to print natural number by [continue]
for num in range(1,11):
if num == 7:
continue
else :
print(num)
By [break]
for num in range(1,11):
if num == 6:
break
else :
print(num)
program to print 1-5 revers counting
1st
for num in range(5,0,-1):
print(num)
print('BOOM\nClyamore !')
2nd
num = 5
while num > 0:
print(num)
num-=1
print("BOOM\nClyamore !")
program to print natural numbers by while loop
num = 1
print("Natural numbers:-")
while num<=10:
print(num)
num += 1
program to print natural numbers by for loop
print("natural nubers:- ")
for num in range(1,11):
print(num)
num +=1
program to print table by using for loop
user = int(input("Enter the number:- "))
print("This is table of ",user)
for num in range(1,11):
print(user * num)
program to unlock phone by using while loop
password = "Vishwas"
upassword = input("Enter the password:- ")
while password != upassword:
upassword = input("Enter the password:- ")
else :
print("Phone unlock !\nWelcome")
program to print whole number
print("Whole number:-")
for _ in range(0,101):
print(_)
program to print number from taking user input
a = int(input("Enter the number from which you print the numbers:-")) #starting number
b= int(input("Enter the number the last number:-")) #Ending number
while a<=b:
print(a)
a +=1