Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 446a567

Browse files
Merge pull request avinashkranjan#2234 from Shivansh-Jain-github/cont1
Python script for Floating text visual effect.
2 parents 53773bd + 968c086 commit 446a567

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Floating Text Effects
2+
3+
This Python script demonstrates how to create floating text effects. It prints each character of the text with a slight delay, giving the appearance of floating text.
4+
5+
## Installation
6+
7+
1. Clone the repository:
8+
9+
```bash
10+
git clone https://github.com/your-username/repository-name.git
11+
```
12+
13+
2. Navigate to the project directory:
14+
15+
```bash
16+
cd repository-name
17+
```
18+
19+
## Usage
20+
21+
1. Open the Python script in your preferred editor.
22+
23+
2. Customize the text by modifying the `print_floating_text` function calls.
24+
25+
```python
26+
print_floating_text("Hi, I am Shivansh Jain.")
27+
time.sleep(1) # Simulating a delay
28+
print_floating_text("I am a Computer Science student.")
29+
time.sleep(1) # Simulating a delay
30+
print_floating_text("I have added this python script which creates floating text effects.")
31+
time.sleep(1) # Simulating a delay
32+
print_floating_text("I know full stack web development using HTML, CSS, Javascript, Django.")
33+
time.sleep(1) # Simulating a delay
34+
print_floating_text("I like cricket, music and mythology.")
35+
```
36+
37+
3. Adjust the sleep duration in the `print_floating_text` function to control the speed of the floating text.
38+
39+
4. Run the script:
40+
41+
```bash
42+
python script.py
43+
```
44+
45+
## License
46+
47+
This project is licensed under the [MIT License](LICENSE).
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import time
2+
3+
# Function to print floating text
4+
def print_floating_text(text):
5+
for char in text:
6+
print(char, end='', flush=True)
7+
time.sleep(0.05) # Adjust the sleep duration for desired speed
8+
print()
9+
10+
# Installation process
11+
print_floating_text("Hi, I am Shivansh Jain.")
12+
time.sleep(1) # Simulating a delay
13+
print_floating_text("I am a Computer Science student.")
14+
time.sleep(1) # Simulating a delay
15+
print_floating_text("I have added this python script which creates floating text effects.")
16+
time.sleep(1) # Simulating a delay
17+
print_floating_text("I know full stack web development using HTML, CSS, Javascript, Django.")
18+
time.sleep(1) # Simulating a delay
19+
print_floating_text("I like cricket, music and mythology.")
20+
21+
# Further code execution
22+
print("Continuing with further code execution...")
23+
# ... Rest of the code ...

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /