Professional Documents
Culture Documents
Python
Python
Problem: Write a Python program that accepts a word from the user and
reverse it.
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program that prints all the numbers from 0 to 6
except 3 and 6.
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program which iterates the integers from 1 to 50. For multiples
of three print "Fizz" instead of the number and for the multiples of five print "Buzz".
For numbers which are multiples of both three and five print "FizzBuzz".
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program to find those numbers which are divisible
1. https://www.w3resource.com/python-exercises/python-conditional-exercise-6.php
2. https://www.w3resource.com/python-exercises/python-conditional-exercise-5.php
3.https://www.w3resource.com/python-exercises/python-conditional-exercise-9.php
4. https://www.w3resource.com/python-exercises/python-conditional-exercise-10.php
5. https://www.w3resource.com/python-exercises/python-conditional-exercise-20.php
6. https://www.w3resource.com/python-exercises/python-conditional-exercise-11.php
7. https://www.w3resource.com/python-exercises/python-conditional-exercise-44.php
8. https://www.w3resource.com/python-exercises/python-conditional-exercise-27.php
9. https://www.w3resource.com/python-exercises/python-conditional-exercise-30.php
10. https://www.w3resource.com/python-exercises/python-conditional-exercise-29.php
11. https://www.w3resource.com/python-exercises/array/python-array-exercise-13.php
12https://www.w3resource.com/python-exercises/array/python-array-exercise-5.php
13. https://www.w3resource.com/python-exercises/array/python-array-exercise-11.php
14. https://www.w3resource.com/python-exercises/array/python-array-exercise-12.php
15https://www.w3resource.com/python-exercises/array/python-array-exercise-9.php
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program which takes two digits m (row) and n (column) as input
and generates a two-dimensional array. The element value in the i-th row and j-th
column of the array should be i*j.
Note :
i = 0,1.., m-1
j = 0,1, n-1.
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program to construct the following pattern, using a nested
loop number.
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program to get the current memory address and the
length in elements of the buffer used to hold an array’s contents and also find
the size of the memory buffer in bytes.
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Problem: Write a Python program to remove a specified item using the index
from an array.
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
<!DOCTYPE html>
<html>
<head>
<body background="aa.jpg">
<style>
@-webkit-keyframes example {
from {
top: -100px;
opacity: 0;
}
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
to {
top: 0px;
opacity: 1;
@keyframes example {
from {
top: -100px;
opacity: 0;
}
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
to {
top: 0px;
opacity: 1;
.modal {
display: none;
position: fixed;
left: 0;
top: 0;
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
width: 100%;
height: 100%;
overflow: auto;
.modal:target {
display: table;
position: absolute;
}
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
.modal-dialog {
display: table-cell;
vertical-align: middle;
.modal-dialog .modal-content {
margin: auto;
background-color: #f3f3f3;
position: relative;
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
padding: 0;
outline: 0;
text-align: justify;
width: 80%;
/* Add animation */
-webkit-animation-name: example;
-webkit-animation-duration: 0.5s;
animation-name: example;
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
animation-duration: 0.5s;
.closebtn {
text-decoration: none;
float: right;
font-size: 35px;
font-weight: bold;
color: #fff;
}
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
.closebtn:hover,
.closebtn:focus {
color: #000;
text-decoration: none;
cursor: pointer;
.container {
header {
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
background-color: PEACHPUFF;
font-size: 25px;
color: white;
footer {
background-color: PEACHPUFF;
font-size: 20px;
color: white;
</style>
</head>
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
<tr>
<td><div align="center">
</div></td>
</tr>
<div class="modal-dialog">
<div class="modal-content">
<header class="container">
</header>
<div class="container">
<p><center><img src="leems.png"></center></p>
</font>
</div>
<footer class="container">
<body>
</footer>
</div>
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
</div>
</div>
</body>
</html>
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science
Republic of the Philippines
TAGUIG CITY UNIVERSITY
Bachelor of Science in Computer Science