GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - zugby0101/python-variables-lab-data-science-intro-000

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
future_tests
future_tests
 
 
.gitignore
.gitignore
 
 
.learn
.learn
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
index.ipynb
index.ipynb
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Variables Lab

Introduction

Now that we know about variables, we want to put them to use by associating them with some data. Here, we will be using variables to store information related to a vacation that we would like to go on.

Just as before, we ask you to run the code and ensure that it matches what is commented out.

Learning Objectives

  • Practice variable assignment in Python
  • Practice variable reassignment in Python

Assigning variables

Assign a variable of travel_month equal to the string "January", as that is the month we would like to travel.

travel_month = None

We start by setting the variable equal to the data type None. As we know, None represents the absence of a value. Now we can take care of assigning the variable to something other than None.

travel_month # "January"

Now let's assign a variable equal to the number of weeks that we would like to travel, 3.

number_of_weeks = None
number_of_weeks # 3

UPDATE: we just learned that we can travel for a longer period of time. So, we need to reassign the number_of_weeks variable equal to 5.

number_of_weeks # 5

Now that's more like it.

Summary

Great! In this lab, we were able to get a sense how to store information in variables through assignment and reassignment.

About

No description, website, or topics provided.

Resources

Readme
License

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.