1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
polet [3.4K]
3 years ago
11

what would be the result of running these two lines of code

Computers and Technology
1 answer:
MatroZZZ [7]3 years ago
8 0

Answer:

Jog

Explanation:

The variable options is a list containing 5 string values

options = ["ski", "surf", "jog", "bike", "hike"]

Indexing in python starts from 0 ; hence the index values of the list values are :

0 - ski

1 - surf

2 - jog

3 - bike

4 - hike

The statement ;

print(options[2]) means print the string at index 2 in the list named options

The string at index 2 is jog ;

Hence, the string jog is printed.

You might be interested in
The numeric keys on a keyboard or calculator are referred to as a:
Anna [14]

Numeric Keypad is the answer

6 0
3 years ago
Define the Artist class with a constructor to initialize an artist's information and a print_info() method. The constructor shou
nika2105 [10]

Answer:

class Artist():

   def __init__(self, artist_name=None, artist_birth_year=0, artist_death_year=0):

       self.artist_name = artist_name

       self.artist_birth_year = artist_birth_year

       self.artist_death_year = artist_death_year

   def display_artist(self):

       if self.artist_death_year == -1:

           print('{}, born {}'.format(self.artist_name, self.artist_birth_year))

       else:

           print('{} ({}-{})'.format(self.artist_name, self.artist_birth_year, self.artist_death_year))

class Artwork():

   def __init__(self, artwork_title=None, artwork_year_created=0, artist=Artist()):

       self.artwork_title = artwork_title

       self.artwork_year_created = artwork_year_created

       self.artist = artist

   def display_artist(self):

       print('artwork_title: {}'.format(self.artwork_title))

       print('Artist: ', end='')

       self.artist.display_artist()

def main():

   user_artist_name = input('Enter the name of artist: ')

   user_birth_year = int(input('Enter birth year: '))

   user_death_year = int(input('Enter death year: '))

   user_title = input('Enter master piece title: ')

   user_year_created = int(input('Enter year created: '))

   user_artist = Artist(user_artist_name, user_birth_year, user_death_year)

   new_artwork = Artwork(user_title, user_year_created, user_artist)

   new_artwork.display_artist()

if __name__ == "__main__":

   main()

Explanation:  

  • Inside the constructor of Artist class, initialize the essential properties.
  • Create the display_artist function that checks whether artist_death_year is equal to -1 and then displays an appropriate message according to the condition.
  • Apply the similar steps as above for the Artwork class.
  • Inside the main method, get the information from user and finally call the display_artist function to print the results on screen.
8 0
3 years ago
Which of the following is a proprietary OS for desktop and laptop computers?
Leni [432]

Answer:

That would be Windows.

Explanation:

If you have any questions feel free to ask in the comments - Mark

Also when you have the chance please mark me brainliest.

3 0
3 years ago
Which term describes data that appear to show some type of patterned relationship with a nursing diagnosis?
marusya05 [52]

Answer:

Related factors

Explanation:

Related factors are those factors "that appear to show some type of patterned relationship with a nursing diagnosis". For example, there are some factors that may increase the vulnerability of an unhealthy event in a person or group. These factors may be psychological, physiological, or chemical factors. Hence these factors are considered related factors if they have any relationship with a particular disease or nursing diagnosis.

7 0
3 years ago
Who should NOT apply for financial aid?
Gnoma [55]

Answer: wealthy students should, not a must, apply for it. Not every student.

7 0
3 years ago
Other questions:
  • The technical relationship between inputs and outputs, which is needed to understand the difference between the short run and th
    5·1 answer
  • Indenting the start and finish of segments
    8·2 answers
  • How are natural systems and engineered systems similar to one another?
    8·1 answer
  • What is the full form of icimod?
    6·1 answer
  • Suppose you're currently completing an examination online. When you're finished, you click on Reset Exam. Why would you do this?
    8·1 answer
  • Importance of type casting in programming ​
    5·1 answer
  • What should you do if your computer is running slower
    12·1 answer
  • Dennis would like to include a video in a presentation. The source of the video is on the internet, but he would like to ensure
    10·2 answers
  • Suppose that each country completely specializes in the production of the good in which it has a comparative advantage, producin
    8·1 answer
  • How can i setup a mesage room and also want to hangout ??????
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!