Python Programming Examples for Beginners, Cheat Sheet of Computer science

A collection of basic python programs designed to introduce fundamental programming concepts. It includes code snippets and expected outputs for a variety of simple tasks, such as checking for palindromes, calculating areas, determining divisibility, and implementing sorting algorithms. The programs cover essential topics like conditional statements, loops, functions, and basic data structures, making it a practical resource for beginners learning python. It provides hands-on examples to help understand and apply core programming principles, suitable for high school students or anyone starting with python.

Typology: Cheat Sheet

2024/2025

Available from 06/16/2025

deepanshi-tiwari-1
deepanshi-tiwari-1 🇮🇳

1 document

1 / 51

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COMPUTER SCIENCE E-BOOK
DEEPANSHI
PYTHON PROGRAM FILE
PROJECT PREPARED BY
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33

Partial preview of the text

Download Python Programming Examples for Beginners and more Cheat Sheet Computer science in PDF only on Docsity!

COMPUTER SCIENCE E-BOOK

DEEPANSHI

PYTHON PROGRAM FILE

Y

#TO CHECK WHETHER A STRING IS PALINDROME OR NOT. CODE:-

#TO CHECK DIVISIBILITY WITH 2.

CODE:-

TO FIND FACTORIAL OF A No.

CODE:-

# TO PRINT FIBONACCI SERIES.

CODE:-

program to reverse a string.

CODE:-

# PROGRAM TO FIND LARGEST ELEMENT.

CODE:-

# TO CALCULATE SUM OF THE DIGITS OF A NO.

CODE:-

to check a no. is prime or not.

CODE:-

# TO CONVERT CELSIUS TO FAHRENHEIT.

CODE:-

# TO CHECK IF A NO. IS ARMSTONG NO. OR NOT.

CODE:-

OUTPUT:

# TO FIND LARGEST AMONG 3.

CODE: OUTPUT:

# TO CHECK IF A SENTENCE IS A PANGRAM OR NOT.

CODE:-

# PYTHON PROGRAM TO CALCULATE AREA OF A TRIANGLE.

CODE:-