UCEST 105 Lab Cycle - 3

Learning Objective:
    Learn to use RATOR tool
    Learn to use nested control statements

RAPTOR programs to try

1.Check positive and negative number
2.Odd or Even Number using modulus (%) operator
3.Print 10, 9, 8, .... 1
4.Print sum of the digits of a number
5.Factorial of a given number

Nesting of Loops/control statements

Print the following patterns using nested loops.
1.Square Pattern:
* * * * *
* * * * *
* * * * *
* * * * *
2.Right-Angled Triangle Pattern:
*
* *
* * *
* * * *
* * * * *
3.Pyramid Pattern:
              *
           * * *
        * * * * *
      * * * * * * *
   * * * * * * * * *
4.Number pattern ( read N; example with N=5 is shown)
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
 
5.Write a python program to generate the following type of pattern for the given N rows where N <= 26.(University Question)
A
A B
A B C
A B C D
A B C D E

6.Pascals Triangle
n=0                  1
n=1              1      1
n=2            1    2    1
n=3.          1  3     3   1
n=4        1    4    6    4    1

7.Print all prime numbers less than 1000.( use nested for loops)
8.Print the multiplication table of numbers from 1-15 ( multiplication limit 10) ( use nested for)
9.Print the digit in words ( eg: 534 Five Three Four , use for loop and match-case )
10.Find the largest digit in a number( use while and if )


Comments

Popular posts from this blog

Algorithmic Thinking with Python UCEST 105- KTU First Semester BTech Course 2024 scheme notes pdf - Dr Binu V P 9847390760

UCEST 105 Lab Cycle - 1

Lab Experiments and Solutions - Algorithmic thinking with Python KTU S1 2024 scheme