/    Sign up×
Community /Pin to ProfileBookmark

Python Programming

Python is great for beginners, often recommended by programmers due to the simplicity of its syntax. It is arguably the most readable programming language.

to post a comment

3 Comments(s)

Copy linkTweet thisAlerts:
@jakekoFeb 06.2023 — Hello. Let’s say I have two blocks of code that are used for different things (A block of code for a math quiz , and a block of code for a Vocab quiz). Can I make each block of code a variable/class of some sort, let me give an example:

if answer == “I Choose Math Quiz!”: print(MathQuizCode)

elif answer == “I choose Vocab Quiz!” print(VocabQuizCode)

I have the code for both the math and Vocab quiz, I just don’t know what to do when the user puts which quiz they want to do.

Any advice will help with python programming, thanks!
Copy linkTweet thisAlerts:
@sibertFeb 06.2023 — As no question is asked. Closing 8 YEARS LATER
Copy linkTweet thisAlerts:
@sibertFeb 06.2023 — {"locked":true}
×

Success!

Help @stevesebastian spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...