-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.py
37 lines (34 loc) · 1.22 KB
/
variables.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Learning to code Variables in Python (via Pirple.com)
Using attributes such as Variables, Strings, Integers (positive numbers), Floats (decimals). These attributes define every
value of what is to be printed on the computer screen: A text, a positive numeric value, and a decimal
value. Using an artist with song and album as basis for learning variables.
"""
Artist = "Artist: Andy Grammer"
Genre = "Genre: Pop"
Song = "Song: I Found You"
Album = "Album: Naive"
Label = "Label: BigBeats Records"
Release = "Release: 2019"
Availability = "Availability: Spotify, YouTube Music, Deezer"
"""
I could just write the Integer itself in the three following definitions, however I chose to write
everything as a string since I want to display the title of the integer as well.
"""
DurationInSeconds = "Duration in seconds: 138.6"
DurationInMinutes = "Duration in minutes: 2.31"
ListenerScore = "Listener rating: 4 out of 5"
"""
This is the code that will be printed (seen) on your screen - in the exact order as sorted/written below.
"""
print(Artist)
print(Genre)
print(Song)
print(Album)
print(Label)
print(Release)
print(Availability)
print(DurationInSeconds)
print(DurationInMinutes)
print(ListenerScore)
# Code written by Caroline Eliasson