File tree Expand file tree Collapse file tree 2 files changed +70
-0
lines changed
.github/Floating text effect Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
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 ) .
Original file line number Diff line number Diff line change
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 ...
You can’t perform that action at this time.
0 commit comments