Tag: Python lab programs

Python Program to Generate Random Number

This program demonstrates how to generate random number in python using the randint method. How to generate random number in Python? Inorder to generate random number in Python, you will need to use the randint() function which is defined in the random module() in python. Output 7 Everytime when the randint function is called , it generates a different output as it is printed.

Python Program to Print Fibonacci Series

In this Python program, you will learn how to generate and print Fibonacci series using loops and conditional statements. What is a Fibonacci Sequence ? A Fibonacci sequence is an sequence of integers where the value of the sequence is determined by adding the preceding two values. The first two values in the sequence is 0 and 1. Then comes Next one with (N-1) +…