From 6896d0321414489cc9f018aaa737fa851989730d Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Tue, 6 Jul 2021 20:48:49 -0500 Subject: [PATCH] update --- 2021-07-05/michael/index.html | 67 ++++++++++++++++++++++++++++++++ 2021-07-05/michael/main.py | 27 +++++++++++++ 2021-07-06/fizz_buzz/Cargo.lock | 7 ++++ 2021-07-06/fizz_buzz/Cargo.toml | 8 ++++ 2021-07-06/fizz_buzz/src/main.rs | 1 + 5 files changed, 110 insertions(+) create mode 100644 2021-07-05/michael/index.html create mode 100644 2021-07-05/michael/main.py create mode 100644 2021-07-06/fizz_buzz/Cargo.lock create mode 100644 2021-07-06/fizz_buzz/Cargo.toml create mode 100644 2021-07-06/fizz_buzz/src/main.rs diff --git a/2021-07-05/michael/index.html b/2021-07-05/michael/index.html new file mode 100644 index 0000000..85de8a3 --- /dev/null +++ b/2021-07-05/michael/index.html @@ -0,0 +1,67 @@ + + + + + + + + How many Letters? + + + + + +

Output

+
+ + + + + + + + \ No newline at end of file diff --git a/2021-07-05/michael/main.py b/2021-07-05/michael/main.py new file mode 100644 index 0000000..2e1f097 --- /dev/null +++ b/2021-07-05/michael/main.py @@ -0,0 +1,27 @@ +# hey bro can I ask for a little help? +# I want to figure out a script or sumn that can count and separate the characters in a string of text +# like if I enter in dushdhaosbvdiebwb +# it’ll tell me how many of which character is in it + + +# key, value +# string, integer +# "a": 1 +# + + +def main(): + freq = {} + str = input("Enter Text: ") + + for char in str: + if char in freq: + freq[char] += 1 + else: + freq[char] = 1 + + print(freq) + + +if __name__ == "__main__": + main() diff --git a/2021-07-06/fizz_buzz/Cargo.lock b/2021-07-06/fizz_buzz/Cargo.lock new file mode 100644 index 0000000..9425803 --- /dev/null +++ b/2021-07-06/fizz_buzz/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "fizz_buzz" +version = "0.1.0" diff --git a/2021-07-06/fizz_buzz/Cargo.toml b/2021-07-06/fizz_buzz/Cargo.toml new file mode 100644 index 0000000..cae5bef --- /dev/null +++ b/2021-07-06/fizz_buzz/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "fizz_buzz" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/2021-07-06/fizz_buzz/src/main.rs b/2021-07-06/fizz_buzz/src/main.rs new file mode 100644 index 0000000..3f92d3e --- /dev/null +++ b/2021-07-06/fizz_buzz/src/main.rs @@ -0,0 +1 @@ +fn main(){for n in 1..101{let mut m=String::new();if n%3==0{m+="Fizz";}if n%5==0{m+="Buzz";}println!("{}",if m.len()==0{n.to_string()}else{m});}} \ No newline at end of file