-
Notifications
You must be signed in to change notification settings - Fork 0
Python Exercise I
Muhammad Zeeshan Babar edited this page Nov 3, 2022
·
1 revision
Print characters from a string (take input from user) that are present at an even index number
Initialize two lists,
- Check if the first and last number of both lists (minimum 6 numbers) are the same.
- Comapre two lists and print out the common numbrs.
Write a code to print all Prime numbers less than 100.
Print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5Display numbers from a list using loop. Write a program to display only those numbers from a list [10, 50, 100, 124, 150, 200, 441, 475, 449, 550] that satisfy the following conditions
The number must be divisible by five If the number is greater than 450, then skip it and move to the next number If the number is greater than 500, then stop the loop
Write a program to print the following start pattern using the for loop
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*Dr Zeeshan @Quantum Photonics Lab, Heriot-Watt University