Python program to lowercase the character without using a function (2024)

  • Home
  • DS & Algo. ▾
    • Data Structure
    • Algorithms
    • Coding Problems
  • Languages ▾
    • C
    • C++
    • C++ STL
    • Java
    • Python
    • Scala
    • Ruby
    • C#.Net
    • Golang
    • Android
    • Kotlin
    • SQL
  • Web. ▾
    • JavaScript
    • CSS
    • jQuery
    • PHP
    • Node.Js
    • AdonisJs
    • VueJS
    • Ajax
    • HTML
    • Django
  • Programs ▾
    • C
    • C++
    • Data Structure
    • Java
    • C#.Net
    • VB.Net
    • Python
    • PHP
    • Golang
    • Scala
    • Swift
    • Rust
    • Ruby
    • Kotlin
    • C Interview Programs
  • Aptitude ▾
    • C Aptitude
    • C++ Aptitude
    • Java Aptitude
    • C# Aptitude
    • PHP Aptitude
    • Linux Aptitude
    • DBMS Aptitude
    • Networking Aptitude
    • AI Aptitude
    • More...
  • Interview ▾
    • Golang
    • MIS Executive
    • DBMS
    • C
    • Embedded C
    • Java
    • SEO
    • HR
  • Find Output ▾
    • C
    • C++
    • C#.Net
    • Java
    • Go
    • PHP
    • More...
  • MCQs ▾
    • Web Technologie MCQs
    • CS Subjects MCQs
    • Databases MCQs
    • Programming MCQs
    • Testing Software MCQs
    • Digital Mktg Subjects MCQs
    • Cloud Computing S/W MCQs
    • Engineering Subjects MCQs
    • Commerce MCQs
    • More MCQs...
  • CS Subjects ▾
    • Machine Learning/AI
    • Operating System
    • Computer Network
    • Software Engineering
    • Discrete Mathematics
    • Digital Electronics
    • Data Mining
    • MIS
    • DBMS
    • Embedded Systems
    • Cryptography
    • CS Fundamental
    • More Tutorials...
  • More ▾
    • Tech Articles
    • Puzzles
    • Full Forms
    • Code Examples
    • Blogs
    • Guest Post
    • Programmer's Calculator
    • XML Sitemap Generator
    • About
    • Contact

Home »Python »Python Programs

Lowercase the character: Here, we are going to learn how to lowercase the character without using a function in Python?By Anuj Singh Last updated : January 04, 2024

Problem statement

In this article, we will go for de-capitalizing the characters i.e. conversion from lowercase to uppercase without using any function. This article is based on the concept that how inbuilt function performs this task for us.

Writing code to take user input as a string and then de-capitalize every letter present in the string.

So, let's write a program to perform this task.

Key: The difference between the ASCII value of A and a is 32

Example

Consider the below example with sample input and output:

Input:Hello world!Output:hello world!

Python code to lowercase the character without using a function

# Python program to lowercase the character # without using a functionst = input('Type a string: ')out = ''for n in st: if n not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': out = out + n else: k = ord(n) l = k + 32 out = out + chr(l)print('----->', out) 

Output

First run:Type a string: Hello world!-----> hello world!Second run:Type a string: HHJHJHFF$%*@#$-----> hhjhjhff$%*@#$Third run:Type a string: abcds14524425way-----> abcds14524425way

To understand the above program, you should have the basic knowledge of the following Python topics:

  • Python Variables
  • Python Data Types
  • Python print() Method
  • Python input() Method
  • Python Conditional Statements
  • Python Loops

Practice more python experiences here: python programs

Python Basic Programs »

Python program to capitalize the character without using a function

Python program to find perfect number

Related Programs

  • Python | Find the factorial of a number using recursion
  • Python | Declare any variable without assigning any value.
  • Python | BMI (Body Mass Index) calculator.
  • Python | Program to print Odd and Even numbers from the list of integers.
  • Python | Program to print Palindrome numbers from the given list.
  • Python | Compute the net amount of a bank account based on the transactions.
  • Python | Count total number of bits in a number.
  • Python | Generate random number using numpy library.
  • Generate random integers between 0 and 9 in Python
  • Python | Program to calculate n-th term of a Fibonacci Series
  • Python program for sum of square of first N natural numbers
  • Python program for sum of cube of first N natural numbers
  • Python program to check prime number
  • Python program to find the largest prime factor of a number
  • Python program to find prime numbers using sieve of Eratosthenes
  • Python program to calculate prime numbers (using different algorithms) upto n
  • Python program to print all prime numbers in an interval
  • Python program to print all positive or negative numbers in a range
  • Python program for not None test
  • Python program for pass statement
  • Python program for Zip, Zap and Zoom game
  • Python program to convert temperature from Celsius to Fahrenheit and vice-versa
  • Python program to find the number of required bits to represent a number in O(1) complexity
  • Python program to count number of trailing zeros in Factorial of number N
  • Python program for swapping the value of two integers
  • Python program for swapping the value of two integers without third variable
  • Python program to find winner of the day
  • Python program for Tower of Hanoi
  • Python program to find standard deviation
  • Python program to find the variance
  • Python program Tower of Hanoi (modified)
  • Python program to convert Centimeter to Inches
  • Python program to convert meters into yards
  • Python program to convert yards into meters
  • Python program to capitalize the character without using a function
  • Python program to find perfect number
  • Python program to print perfect numbers from the given list of integers
  • Python program to find greatest integer using floor() method
  • Python program to find the maximum EVEN number
  • Python program to find the maximum ODD number
  • Python program to find the solution of a special sum series
  • Python | Convert the binary number to decimal without using library function
  • Python | Convert the decimal number to binary without using library function
  • Create a stopwatch using Python
  • Python program to find the maximum multiple from given N numbers
  • Python program to find the least multiple from given N numbers
  • Find the root of the quadratic equation in Python
  • Python program to check the given Date is valid or not
  • Python program to print the calendar of any year

Comments and Discussions!

Load comments ↻


Python program to lowercase the character without using a function (2024)
Top Articles
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 5704

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.