filmov
tv
Python Guide // Ep 7// Subroutines + return command

Показать описание
Episode 7 of my python guide about libraries, more specifically, the time and os library. Also paramaters of subroutines and lastly the return command. I hope you enjoy!
Download link to Thonny:
Answer to challenge:
import random, os, time
def rollDice(side):
return result
def health():
healthStat = ((rollDice(6)*rollDice(12))/2)+10
return healthStat
def strength():
strengthStat = ((rollDice(6)*rollDice(8))/2)+12
return strengthStat
while True:
print("⚔ CHARACTER BUILDER ⚔")
print()
name = input("Name your Legend:\n")
type = input("Character Type (Human, Elf, Wizard, Orc):\n")
print()
print(name)
print("HEALTH:", health())
print("STRENGTH:", strength())
print()
print("May your name go down in Legend…")
print()
again = input("Again?:\n")
if again=="No" or again=="no":
break
Social Media:
TAGS:
Python, python for hackers, python for everyone, python for everybody, python right now, you need to learn python right now, learn python, python for beginners
Download link to Thonny:
Answer to challenge:
import random, os, time
def rollDice(side):
return result
def health():
healthStat = ((rollDice(6)*rollDice(12))/2)+10
return healthStat
def strength():
strengthStat = ((rollDice(6)*rollDice(8))/2)+12
return strengthStat
while True:
print("⚔ CHARACTER BUILDER ⚔")
print()
name = input("Name your Legend:\n")
type = input("Character Type (Human, Elf, Wizard, Orc):\n")
print()
print(name)
print("HEALTH:", health())
print("STRENGTH:", strength())
print()
print("May your name go down in Legend…")
print()
again = input("Again?:\n")
if again=="No" or again=="no":
break
Social Media:
TAGS:
Python, python for hackers, python for everyone, python for everybody, python right now, you need to learn python right now, learn python, python for beginners
Python Beginner Tutorial #7 - Functions
Python tutorial for ABSOLUTE Beginners! What are Methods in Python ? Episode 7
Make YOUR OWN Programming Language - EP 7 - FOR and WHILE statements
User Input and While Loops - Python Crash Course - Episode 7
It’s literally perfect 🫠 #coding #java #programmer #computer #python
Python Tutorials EP 7#python #softwareengineering #programminglanguage #datascience #coding
Lecture 7 : File Input/Output in Python
Functions in Python are easy 📞
Learn Python in Less than 10 Minutes for Beginners (Fast & Easy)
you need to learn Python RIGHT NOW!! // EP 1
Python for Beginners – Full Course [Programming Tutorial]
Pygame Tutorial - Making a Platformer ep. 7: Infinite Worlds & Optimization
👩💻 Python for Beginners Tutorial
Python Full Course for free 🐍 (2024)
Python Programming All-in-One Tutorial Series (7 HOURS!)
7 Data Structures that Every Programmers Must Learn || Programming #tutorial #beginners #python
Impress your crush using Python Code ❤️
First python program🤞|| print 'Hello world!' in python 😇#pythonprogram #HelloWorld #print...
Best Programming Languages #programming #coding #javascript
How to Learn Python Fast in 2024? | Learn Python With ChatGPT | Intellipaat #Shorts #Python #ChatGPT
How to create graphics using Python turtle 🐍🐢 #coding
Subscribe for more coding tips🔥#trending #python #coding #aitools #java #program
For Loop in Python
If statements in Python are easy (if, elif, else) 🤔
Комментарии