Skip to content

Instantly share code, notes, and snippets.

View Vishakha263's full-sized avatar

Vishakha Nerkar Vishakha263

  • Mumbai
View GitHub Profile
@Vishakha263
Vishakha263 / PQ1.py
Last active May 26, 2019 06:55
break control statement
import random
bottles=['Yellow','Blue','Red','Black']
for chances in range (0,10):
shot_bottle=random.choice(bottles)
print(shot_bottle)
if (shot_bottle == 'Black'):
print ('GAME OVER')
break
@Vishakha263
Vishakha263 / PQ2.py
Last active May 6, 2019 04:11
break
import random
bottles=['Yellow','Blue','Red','Black']
lives=4
for chances in range (0,20):
shot_bottle=random.choice(bottles)
print(shot_bottle)
if (shot_bottle == 'Black'):
lives -=1
@Vishakha263
Vishakha263 / PQ3.py
Last active May 25, 2019 13:39
break
shot_bottles=['Yellow','Green','Blue','Red','Black']
level,score=1,0
for bottle in shot_bottles:
if bottle != 'Black':
score+=1
if score==2:
level+=1
break
count=0
stud_marks=[84,31,56,77,22,9,89]
for marks in stud_marks:
if (marks<32):
continue
count+=1
i=0
while i >= 0:
i=i+1
if i % 2 == 0:
continue
print(i)
i=1
while (i<4):
if(i==2):
i+=1
continue
print(i)
i+=1
total_pen=int(input())
for pen in range (0,total_pen):
if (pen==30):
print('box is packed')
break
types = ['broken', 'intact', 'crushed']
collected_shells = 0
for shell in types:
if shell=="broken":
continue
else:
collected_shells+=1
print(collected_shells)
break
list=[1,2,3,4,1,2,3,4,1,2]
for i in list:
if (i==4):
break
print(i)
star,i=0,1
while i>0:
if (star==6):
break
print('*',end='')
star+=1
print('Congratulations')