kristofer / Digital Clock Py GUI
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
1 | from tkinter import Label, Tk |
2 | import time |
3 | |
4 | # need to `brew install python-tk` |
5 | # to setup a mac for tkinter |
6 | # |
7 | |
8 | app_window = Tk() |
9 | app_window.title("Digital Clock") |
10 | app_window.geometry("420x150") |
kristofer / qrcodepy.md
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
pip install pyqrcode
How to create a QR Code with Python:
import pyqrcode
from pyqrcode import QRCode
# String (URL) to make into QR code
s = "https://zipcodewilmington.com"
kristofer / Python Alarm
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
1 | from datetime import datetime |
2 | from playsound import playsound |
3 | alarm_time = input("Enter the time of alarm to be set:HH:MM:SS\n") |
4 | alarm_hour=alarm_time[0:2] |
5 | alarm_minute=alarm_time[3:5] |
6 | alarm_seconds=alarm_time[6:8] |
7 | alarm_period = alarm_time[9:11].upper() |
8 | print("Setting up alarm..") |
9 | while True: |
10 | now = datetime.now() |
kristofer / Acronym Python
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
user_input = str(input("Enter a Phrase: "))
text = user_input.split()
a = " "
for i in text:
a = a+str(i[0]).upper()
print(a)
kristofer / Acronym Python
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
user_input = str(input("Enter a Phrase: "))
text = user_input.split()
a = " "
for i in text:
a = a+str(i[0]).upper()
print(a)
kristofer / Linear Search Java
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
public class LinearSearch {
// Method that performs linear search
public static int linearSearch(int[] array, int target) {
// Iterate through each element in the array
for (int i = 0; i < array.length; i++) {
// If current element matches target, return its index
if (array[i] == target) {
return i;
}
kristofer / Java Strings Intro
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
Basic Intro to Java String class.
Working with Strings in Java
String Creation and Basics
Strings are immutable objects in Java. Here are different ways to create them:
public class StringBasics {
public static void main(String[] args) {
// String creation
kristofer / Java Intro level 0
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
Very VERY Basic Introduction to Java Programming
VERRRRRRY Basic Introduction to Java Programming
1. Basic Program Structure
Every Java program starts with a class, and the main method is the entry point of the program. Here's a simple example:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
kristofer / Java Control Flow: If Statements and Loops
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
Java Control Flow: If Statements and Loops
Java Control Flow: If Statements and Loops
If Statements
Basic If Statement
The simplest form of decision making:
public class BasicIf {
public static void main(String[] args) {