[Go to site: main page, start]

0% found this document useful (0 votes)
6 views5 pages

Essential Python Basic Programs Guide

The document contains a comprehensive list of basic Python programs covering various topics such as printing messages, variable types, arithmetic operations, control structures, and functions. It includes examples for user-defined methods, loops, conditionals, and mathematical calculations. Additionally, the document features programs for data conversion, character manipulation, and game design.

Uploaded by

nakkasrinu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Essential Python Basic Programs Guide

The document contains a comprehensive list of basic Python programs covering various topics such as printing messages, variable types, arithmetic operations, control structures, and functions. It includes examples for user-defined methods, loops, conditionals, and mathematical calculations. Additionally, the document features programs for data conversion, character manipulation, and game design.

Uploaded by

nakkasrinu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python basic programs

1. Python | Printing different messages by using different variations of print()


method.
# it will print new line after the messages
print("Hello")
print("World")

# it will print new line


print()

# it will print new line after printing "Hello"


print("Hello",end="\n")
# it willprint new line after printing "World"
print("World")

# it will print new line


print()

# it will not print new line after printing "Hello"


# it will print space " "
print("Hello",end=" ")
# it will print new line after printing "World"
print("World")
2. Python program to print given text using a user-defined method

3. Python | Printing different values (integer, float, string, Boolean).


4. Python | Declare different types of variables, print their values, types and Ids.
5. Python program to demonstrate variables scope
6. Determine the type of an object in Python
7. Create number variables (int, float and complex) and print their types and values
in Python
8. Create integer variable by assigning binary value in Python
9. Create integer variable by assigning octal value in Python
10. Create integer variable by assigning hexadecimal value in Python
11. Python | Typecasting Input to Integer, Float.
12. Python | Program to define an integer value and print it.
13. Python | Input two integers and find their addition.
14. Python program to find sum of two numbers
15. Python program to find addition of two numbers (4 different ways)
16. Python program to print ASCII value of a character
17. Python program for simple interest
18. Python program for compound interest
19. Python program to check whether a given number is a Fibonacci number or not
20. Python program to find power of a number using exponential operator
21. Python program to find the power of a number using loop
22. Python program to find the power of a number using recursion
23. Python program to extract and print digits in reverse order of a number
24. Python program to reverse a given number (2 different ways)
25. Python program to find floor division
26. Python | Some of the examples of simple if else.
27. Python | Input age and check eligibility for voting.
28. Python | Find largest of three number using nested if else.
29. Python | Calculate discount based on the sale amount.
30. Python | Calculate discount based on the sale amount using Nested if else.
31. Python | Example of Ternary Operator
32. Python | Design a simple calculator using if elif (just like switch case)
33. Python | Demonstrate an example of for loop
34. Python | Demonstrate an example of for each loop
35. Python | Examples of loops (based on their control)
36. Python | Some of the Examples of loops
37. Python | Demonstrate an Example of break statement
38. Python | Demonstrate an Example of continue statement
39. Python | Demonstrate an Example of pass statement
40. Python | Program to print numbers from N to 1 (use range() with reverse order).
41. Python | Print all numbers between 1 to 1000 which are divisible by 7 and must
not be divisible by 5.
42. Python | Calculate square of a given number (3 different ways).
43. Python | Find factorial of a given number (2 different ways).
44. Python | Find the factorial of a number using recursion
45. Python | Write functions to find square and cube of a given number.
46. Python | Declare any variable without assigning any value.
47. Python | Write a function to find sum of two integral numbers in string format.
48. Python | BMI (Body Mass Index) calculator.
49. Python | Program to print Odd and Even numbers from the list of integers.
50. Python | Program to print Palindrome numbers from the given list.
51. Python | Compute the net amount of a bank account based on the transactions.
52. Python | Count total number of bits in a number.
53. Python | Generate random number using numpy library.
54. Python | Program to calculate n-th term of a Fibonacci Series
55. Python program to calculate prime numbers (using different algorithms) upto n
56. Python program for not None test
57. Python program to check whether a string contains a number or not
58. Python program for pass statement
59. Python program to define an empty function using pass statement
60. Python program for Zip, Zap and Zoom game
61. Python program to convert temperature from Celsius to Fahrenheit and vice-versa
62. Python program to find the number of required bits to represent a number in O(1)
complexity
63. Python program to count number of trailing zeros in Factorial of number N
64. Python program for swapping the value of two integers
65. Python program for swapping the value of two integers without third variable
66. Python program to find winner of the day
67. Python program to find the matched characters in a given string
68. Python program for Tower of Hanoi
69. Python program to find standard deviation
70. Python program to find the variance
71. Python program Tower of Hanoi (modified)
72. Python program to convert Centimeter to Inches
73. Python program to convert meters into yards
74. Python program to convert yards into meters
75. Python program to capitalize the character without using a function
76. Python program to lowercase the character without using a function
77. Python program to find perfect number
78. Python program to print perfect numbers from the given list of integers
79. Python program to design a dice throw function
80. Python program to design a biased dice throw function
81. Python program to design a biased coin flip function
82. Python program to design a coin flip function
83. Python program to find greatest integer using floor() method
84. Python program to find the maximum EVEN number
85. Python program to find the maximum ODD number
86. Python program to find the solution of a special sum series
87. Python | Convert the binary number to decimal without using library function
88. Python | Convert the decimal number to binary without using library function
89. Python | Find the frequency of each character in a string
90. Create a stopwatch using Python

You might also like